Javascript for validating email
03-Apr-2020 04:41
HTML One thing I know could be improved is where I repeat basically the same code twice to validate the characters in each section.
I am more interested in hearing if the way I've structured the function and sections could be done better, as the exercise for me was more about writing well-structured Java Script and getting familiar with some of the built-in functions than about writing a perfect validator (which is also the reason I didn't use Regex).
The drop down select list boxes usually will have one item saying ‘Select One’ (and that item will be selected by default).
The user should select an option other than this ‘Select One’ item.
This validation descriptor is valid only for drop down lists.
Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange I'm trying to improve my Java Script (I'm usually a copy/paste guy but can do basic DOM stuff with j Query too), so I decided to try and make a function to validate an email address without using Regex.
The script has a catalog of almost all the common validation types built-in.
The idea is to create a set of “validation descriptors” associated with each element in a form.When there are many fields in the form, the Java Script validation becomes too complex.