问题:触发验证时CSS没有被更改
场景:在我的项目中,我使用的是jQuery验证和淘汰验证.在淘汰赛中,我有一个父模型绑定和子模型,它们是在按钮点击事件中动态生成的.
验证:对于父模型绑定我有jQuery验证(使用模型验证),但对于子模型,我有敲门验证(因为模型中没有提到属性)
问题:验证消息正在显示,但css错误类没有得到绑定.对于我已经提到的淘汰验证
ko.validation.init({
registerExtenders: true,
messagesOnModified: false,
insertMessages: false,
decorateElement: true,
errorElementClass: 'input-validation-error',
errorMessageClass: 'field-validation-error'
});
Run Code Online (Sandbox Code Playgroud)
淘汰赛版本:淘汰赛:3.0.0