validate Email ( ) Next we want to see if the email address the user entered is real.
This means that the input data must contain at least an @ sign and a dot (.).
Any interactive web site has form input - a place where the users input different kind of information.
This data is passed to ASP script, or some other technology and if the data contains an error, there will be a delay before the information travels over the Internet to the server, is examined on the server, and then returns to the user along with an error message.
If some of the data that had been entered by the client had been in the wrong form or was simply missing, the server would have to send all the data back to the client and request that the form be resubmitted with correct information.At first we use regular expression and the replace() method to clear out any spacer characters.Next, we use the is Na N() function to check if the phone number contain only numbers.At last we check the length of the string and permit only phone numbers with 10 digits. When the user clicks the Submit button on the form, the form data is sent to a Java Script validation function that checks each field to make sure that it is in the appropriate format.I found this code in some website, and it works perfectly. \d())" (() the middle parenthesis was actually seen as part of the regex syntax and not characters to be looked for.
If its not blank, the function returns an empty string.