Releases: niceue/nice-validator
Releases · niceue/nice-validator
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
New
Now you can use the "showmsg" event to do the same thing as the "showMsg" method.
// before
$("#form1").validator("showMsg", {
"mobile": "This phone number has been used",
"email": "Email is required"
})
// after
$("#form1").trigger("showmsg", [{
"mobile": "This phone number has been used",
"email": "Email is required"
}])
Fixed
- Fixes in some cases the valid callback is not triggered for the first time
- Fixed the use of the function target does not come into effect
- Fixed IE7 compatibility issues
- Fixed
this.isValid
is not accurate in validation callback - Fixed Requirejs usage.
Now support the following configuration forrequirejs
:
requirejs.config({
paths: {
jquery: 'http://cdn.jsdelivr.net/jquery/1.12.3/jquery.min',
validator: 'path/to/nice-validator/local/zh-CN'
},
shim: {
validator: ['path/to/nice-validator/jquery.validator.js?css']
}
});
require(['jquery', 'validator'], function($){
$('#form1').validator();
});
- Avoid JavaScript keyword
- degrade uglify to 1.5.4