A valid email is of the format: [email protected] The name can be a set of ‘atoms’ separated by dots. single or double quotes and any character inside the quotes Now, to the domain part. MUSEUM .travel, .international or even .vermögensberatung For example all the following email addresses are valid: Source The sad truth is that despite the complex regular expression validation, the email may not be existing, so can still be invalid for practical purposes.Most email validation checks assumes that the top level domain can have up to 4 characters. You have just validated the format – not its existence.Most Java Script form validation libraries are large, and often require other libraries like j Query. For example, Mail Chimp's embeddable form includes a 140kb validation file (minified). Add the attribute let's you run regex validations against input values. If you, for example, required passwords to contain at least 1 uppercase character, 1 lowercase character, and 1 number, the browser can validate that for you.
For a credit card number the real validation happens on the server side, but some preliminary pattern checking is done on the server end as well.