4 ms·
Perfect Javascript Form Validation using Regular Expressions.
I had designed a perfect form validation using javascript regular expression. Simple code and works perfect in all conditions. It's very useful and supporting all the web browsers just take a look at post live demo.
- ionfish 18y agoTaking a perfectly ordinary form and breaking it in a completely unnecessary way so that it no longer works for users without JavaScript is quite rude. The same effect can be achieved just as easily with event handlers, and will result in more modular code with greater separation between the structural and behavioural layers. If you really want to do form validation you'd be better off using something like Ojay's Forms package: http://ojay.othermedia.org/articles/forms.html http://ojay.othermedia.org/articles/forms.html