组合
与 And
使用 and 来组合两个验证规则,只有当两个规则都通过时才是通过
v.val(50, ">18 and <60"); // true
v.val(70, ">18 and <60"); // false或 Or
使用 or 来组合两个验证规则,只要有一个通过就认为是通过了
v.val(50, "<18 or >60"); // false
v.val(70, "<18 or >60"); // true否 Not
使用 not() 来翻转一个规则的结果,将 true 变为 false ,false 变为 true
v.val(50, "not(>60)); // trueLast updated
Was this helpful?