Supported Rules
requiredbooleanrequired fields will be given a unique class you can use to mark the field as required. E.g:
.VF-Field--required label {
position: relative;
}
.VF-Field--required>label:before {
content:"*";
font-size: 20px;
color:red;
position: absolute;
left:-15px;
}
requiredIfstring- make the field required only if another field was filled with a value (typically a select or checkbox). The field would only display when required. To set specific values for requiring the field use the following format:{ field: { requiredIf:'otherField:val1, val2' } }requiredAndShownIfstring- same asrequiredIf, except that the field is also hidden when it is not required.emailboolean- Automatically set totrueforvf-emailnumberboolean- Automatically set totrueforvf-numbermin,max,betweennumber-a. If the
numberorintegerrules are set totruevalidates numeric valuesb. If the parameter is a
momentobject or aYYYY-MM-DD-formatted string validates datesc. Otherwise - validates string length
integerbooleandigitsbooleanremotestringValidate field on the server end. Accepts a URL, to which the value is sent on change event as a request parameter. Requiresvue-resourcegreaterThan,smallerThanstringaccepts the name of the compared field. Compares numbers and datesurlbooleanmatchesstringThe field under validation must match the specified field. The classic usage is password confirmation.