情景:
在使用jQuery validate时如下所示
emali:true, messages:{required:'请输入电子邮箱', email:'电子邮 箱格式输入有误'}} text" path="email"/>
在标红处出现异常
exception occured when checking element email, check the 'emali' method
Uncaught TypeError: Cannot read property 'call' of undefined
原因:
无法调用email这个验证方法,在自己加的验证规则中也有个email的方法
解决:
将自己所加的校验规则中的email方法换个名字