The CGI script is still more reliable, as it always works regardless of whether Java Script is enabled on the client-side or not; but having this extra safety barrier is a nice thing to have in place.
It makes your page much more user-friendly, and takes out the frustration of having to fill out the same form repeatedly.
Below are the ways to get the value from all types of form elements.
Usually you'll just want to check if Modern Web Design Using Java Script & DOMJava Script is back!
I just wanted to add that the title attribute allows you to set the message to display to the user if the pattern is not met. Totally works, but the error you get when not meeting the pattern requirements is: "Please match the requested format" or something along those lines.
It begs the follow up question: how do you customize the error message :-) min Length attribute (unlike max Length) does not exist natively in HTML5.
However there a some ways to validate a field if it contains less than x characters.
An example is given using j Query at this link : Thanks for this elegant updated solution.