1

I'm using the jquery-validation-engine plugin and after validate I need to add a class to the inputs with the error promt to add for example a red border or something like that, is there a way using the plugin configuration to setup this?

1 Answer 1

4

I alsow use that same plugin.

Do you have the last verion off the plug-in ? In the file: jquery.validationEngine.js

you will find almost at the bottom:

InvalidFields: [],
    onFieldSuccess: false,
    onFieldFailure: false,
    onSuccess: false,
    onFailure: false,
    addSuccessCssClassToField: false,
    addFailureCssClassToField: false,

These are the 'master' settings for the options you are looking for. My current setup is like:

        InvalidFields: [],
    onFieldSuccess: true,
    onFieldFailure: true,
    onFormSuccess: false,
    onFormFailure: false,
    addSuccessCssClassToField: 'inputbox-success',
    addFailureCssClassToField: 'inputbox-error',

And then the two css classes in youre css file ( 'inputbox-error' & 'inputbox-succes').

This works just fine over here.. Good Luck...

And if you have any more question about this plugin or other functions off it just ask .. :P

Greets, Marco

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

1 Comment

Thanks for the answer. Is it possible to add icon before error message.

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.