更新时间:2022-12-07 08:37:56
根据在线文档,则需要使用onfocusout:
和onkeyup:
选项.
As per online documentation, you need to use the onfocusout:
and onkeyup:
options.
在模糊时验证元素(复选框/单选按钮除外).如果 不输入任何内容,所有规则都将被跳过,除非该字段为 已经被标记为无效.
Validate elements (except checkboxes/radio buttons) on blur. If nothing is entered, all rules are skipped, except when the field was already marked as invalid.
此禁用 onblur验证:
This disables onblur validation:
onfocusout: false
验证键盘上的元素.只要该字段未标记为 无效,没有任何反应.否则,将检查每个键上的所有规则 向上事件.
Validate elements on keyup. As long as the field is not marked as invalid, nothing happens. Otherwise, all rules are checked on each key up event.
此禁用 onkeyup验证:
This disables onkeyup validation:
onkeyup: false
根据您是否具有复选框和单选按钮,您可能还希望禁用onclick:
选项.
And depending on if you have checkboxes and radio buttons, you may want to disable the onclick:
option as well.
在点击时验证复选框和单选按钮.
Validate checkboxes and radio buttons on click.
此禁用 onclick验证:
This disables onclick validation:
onclick: false