Validate two input fields for content ignoring the placeholder string
$10-30 USD
Færdiggjort
Slået op over 8 år siden
$10-30 USD
Betales ved levering
I have three input fields:
HTML:
<input type="text" class="form-control" id="form-signup-field-firstname" placeholder="First name">
<input type="text" class="form-control" id="form-signup-field-lastname" placeholder="Last name">
<input type="email" class="form-control" id="form-signup-field-email" placeholder="[login to view URL]">
JS: And the following function to use for validating the email:
function validateEmail(email) {
var emailReg = /^([\w-\.]+([\w-]+\.)+[\w-]{2,4})?$/;
return [login to view URL]( email );
}
TO-DO:
1. Validate field 1 + 2 and check if the fields are empty
2. Validate the email with the above function (had to remove some signs in the function in this preview - full function will be provided)
3. Trigger an JS alert with the fields not validating correct:
alert("First name was not filled out correct\nLast name was not filled out correct\nThe email was not filled out correct");
Need someone to do this now
Dear Employer ,
We are highly interested in your project as it lies within our domain of expertise. We have an in house team with expert skills and dedication to work. We have javascript experts and this is a very simple task, so can do it right now for just $17. So contact us to start the work.
Regards
Team Codistan
Your requirement is well understood. we will get this done in a few fours. We have a vastly experience team and you can see a portfolio of our works. Anticipating your prompt response
I am interested in your project. I have created lots of web forms with these kind of validation filters. I can solve this problem in less than one day!