Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I validate my jQuery script?

I am looking for an online jQuery validator. Not a script that will validate my forms but an online tool with which I can give it some jQuery script and have it return syntax errors and other useful information. Thanks in advance!

like image 982
Web_Designer Avatar asked Mar 19 '11 03:03

Web_Designer


People also ask

How do you check if jQuery validate is working?

fn , so simply check whether it exists or not; if (typeof jQuery. fn. validationPlugin === "function") { // It's loaded } else { // It's not. }

What is jQuery validate?

Validation in JQuery: Using JQuery, a form is validated on the client-side before it is submitted to the server, hence saves the time and reduce the load on the server. Form Validation means to validate or check whether all the values are filled correctly or not.


2 Answers

Check out jsfiddle.net. You can paste in your Javascript, link in external libraries, and run your code through both a formatter and JSLint, which will identify any issues in the syntax of the code itself.

It also provides a preview pane to go through more thorough functionality testing.

like image 96
dmcnelis Avatar answered Sep 29 '22 13:09

dmcnelis


Try jQuery lint. Quoting the website:

jQuery Lint is a simple script you can download and use with jQuery. It works over the top of jQuery and diligently reports errors and any incorrect usage of jQuery. It will also, to some extent, offer guidance on best practices and performance concerns.

If you really need to use it online, you can do so on jsfiddle.

like image 30
Mark Eirich Avatar answered Sep 29 '22 11:09

Mark Eirich