1

I'm using jquery form validator to validate some data on server side. my code is like

HTML :

<input data-validation="server" data-validation-url="/validate" name="vip_ip" type="text" id="vip_ip">
<script type="text/javascript" src="{{ URL::asset('js/form.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('js/jquery.form-validator.min.js') }}"></script>

Form.js :

$(function($) {
$.validate({
    borderColorOnError: '',
    lang: 'fr'
});

This is the error that the validator throws on the console :

Uncaught Error: Using undefined validator "validate_server"

I dont understand why the plugin adds this validate prefix. whice prevents the validation from working. thanks for your help.

1 Answer 1

2

Server Validation is in Security Module (Ref: http://www.formvalidator.net/index.html#security-validators_backend)

You need to enable the module by

$(function($) {
$.validate({
    modules : 'security',
    borderColorOnError: '',
    lang: 'fr'
});
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.