Validating input in javascript

Posted by / 05-Apr-2016 20:16

This is validation to check that entered values are all letters or combination of different chars.

View example » Parsley is shipped with more than a dozen useful validators.

If it finds any it sends the page back to the reader who then has to re-enter some data, before submitting again.

A Java Script check is useful because it stops the form from being submitted if there is a problem, saving lots of time for your readers.

There is also a Travis project used for testing, a Coveralls project used to code coverage as well as the annotated source.

is an open source component of Wrapp and is licensed under the MIT license.

validating input in javascript-39validating input in javascript-22validating input in javascript-42

Listing 3: Validation for all letters Figure 3: Above output checks the entered data is letters or include any other char also. Two of them are using regular expression for matching and the other one is simple so not writing regex but if you want you can write a regex for this case also.

One thought on “validating input in javascript”