Javascript code to validate email addresses
Validating email address in put using Javascript can be tricky. Contrary to popular belief, email addresses can contain almost all type of characters and a valid email address can take complex forms. For example, the email addresses below are perfectly valid: firstname+lastname@domain.com much.”more\ unusual”@example.com あいうえお@a.long.domain.example.university One of the straight forward way to validate an email address is using regular expressions Here is a moderately reasonable email validation function using regular expression: