0

I am using jquery form validation plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/

If form is invalid my server gives response in name pair combination where :

data: email:"Is invalid" name" "Is invalid"

is it possible to use with jquery ajax on form submit and mark field as an error using this plugin ?

1 Answer 1

1

The jQuery validate plugin is all about client validation. It supports remote validation as well but it is intended to be used to validate a single field but you can send additional fields to the server to validate this single field. If you are performing your entire validation of multiple fields on the server (which you always should), you'd better leave it to the server when the form is submitted.

Sign up to request clarification or add additional context in comments.

4 Comments

so I should create view from server side only ?
@Vivek Goel, you could validate single fields using AJAX thanks to the remote rule. So basically for non-sensitive validation rules that can be performed on the client you could define those rules using the plugin.
I don't have single rule validation on remote. It validation full form in one go.
@Vivek Goel, you see that's the problem. You could achieve it but you will be writing lots of javascript and defeating the whole point of client side validation which is intended to replicate the same validation rules as your server in the purpose to avoid hitting the server and preserving bandwidth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.