Introduction: The form verification function can be realized completely through HTML without writing a JS program. It can support multi-condition verification of a form component
It has nothing to do with the server program and is completely client-side.
How to use: Add onsubmit="return validator(this)" to the form to be validated
Set, valid (validation rule), errmsg (prompt message) in the form component to be validated, Multiple verifications use | all separated!
Validation rule parameters:
required Required
isEmail must be in Email format
eqaul Whether the comparison value with another component is the same, the compared component name is added to the component with the attribute eqaulName
gt Whether the comparison value with another component is greater than another component Value, the compared component name is added to the component with the attribute eqaulName.
isNumber is a number.
isInt is an integer.
isTime is a time format.
isDate is a date format.
Next The version will add content, customize message prompts, and customize callback functions.
Local package file download