1
任何人都可以帮助我达到parsleyField。$元素在自定义验证器Parsley JS?
代码:
window.ParsleyValidator.addValidator('customValidator',
function (value, requirement) {
// how to access here to parsleyField.$element ?? or how to access my custom data-attributes in field ??
return false; //debug
}, 32)
.addMessage('ru', 'customValidator', 'message');
附: 香菜JS 2.1.3版
感谢马克!这是最简单的解决方案:)我希望这会帮助其他人。 –
当然。那么你应该接受并且赞成这个答案。 –