Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendation for javascript form validation library [closed]

Any recommendations for a javascript form validation library. I could try and roll my own (but I'm not very good at javascript). Needs to support checking for required fields, and preferably regexp validation of fields.

like image 990
robintw Avatar asked Aug 20 '08 12:08

robintw


People also ask

Why is JavaScript form validation not sufficient when validating form data?

JavaScript powered validation can be turned off in the user's browser, fail due to a scripting error, or be maliciously circumvented without much effort. Also, the whole process of form submission can be faked. Therefore, there is never a guarantee that what arrives server side, is clean and safe data.

Can JavaScript be used for form validation?

HTML form validation can be done by JavaScript.

Which of the JavaScript event is useful for form validation?

Notice that for validation, the JavaScript function containing the code to validate is called on the onSubmit event of the form.


1 Answers

I am about to start implementing javascript validation in my forms using jQuery Validation. I think that StackOverflow users this jQuery plugin as well. It seems to be a very mature validation library, however it does build on top of jQuery, so it might not fit for you.

Like Tom said, don't forget that server side validation.

like image 112
AidenMontgomery Avatar answered Oct 14 '22 22:10

AidenMontgomery