Enable validation on a form
Creating validation rules has no effects unless you connect them to a form. This can be done through two methods, depending on the desired effect. Both of these methods accept one or more validation rules:
validateAll(rule1, rule2, rule3, ...); validateAny(rule1, rule2, rule3, ...);
You should only call one of these methods, and only once per form. In addition
to the two above, validateAll is aliased as validate.
validateAll and validate requires all its arguments
to pass validation, validateAny only requires one of them to pass.
validate(rule1, rule2, rule3, ...);