我用 formValidation 编写了一个登录表单验证。现在我想在我的脚本中调用这个函数。如何调用 form_login 函数?
(function(){
$.fn.validation = {
form_login: function(form){
$(form).formValidation({
icon: {
valid: 'fa fa-check',
invalid: 'fa fa-remove',
validating: 'fa fa-refresh'
},
fields: {
usernme: {
validators: {
notEmpty: {},
}
},
password: {
validators: {
notEmpty: {},
}
},
captcha: {
validators: {
notEmpty: {},
}
}
}
});
},
};
}());