victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

data-validation="size" Error Maybe you have forgotten to load the module that validate_size #625

Closed josedaboinv closed 7 years ago

josedaboinv commented 7 years ago

Hi, When i try this rule data-validation="size"

The console show this error

Error: Using undefined validator "validate_size". Maybe you have forgotten to load the module that "validate_size" belongs to? jquery.form-validator.min.js:9:15162

I try this

jQuery.validate({
  modules : 'date, security, validate_size',
  onModulesLoaded : function() {
    alert('All modules loaded!');
  }
});

But nothing happen

josedaboinv commented 7 years ago

well, now i loaded file.js

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
<script type='text/javascript' src='http://localhost/wp/wp-content/themes/shop/js/file.js?ver=4.8'></script>

but now show this error

$.formUtils.registerLoadedModule is not a function

victorjonsson commented 7 years ago

The size validator is part of the file module.

jQuery.validate({
  modules : 'date, security, file'
});