The validity object of a form control object can set or return related validation information (Gets the validity object in invalid event processing):
- Property valid: True for all validations passed, for false at least one validation failure.
- Property Valuemissing: The property value is true when the form control input value is null, and the property value is false when it is not empty.
- Property Typemismatch: This property is true if the input content does not conform to the control type requirement, otherwise false.
- Property Patternmismatch: When the input does not match the regular expression, the property is true, otherwise false.
- Property Toolong: The property is true if the input exceeds the preset maximum length, otherwise false.
- Property Rangeunderflow: The value of the validation is less than the minimum value of the preset, and the value cannot be set to be smaller than the minimum value in the actual operation, so there is no OVA for this property.
- Attribute Rangeoverflow: With Rangeunderflow, there is no egg to use.
- Property Stepmismatch: Verifies whether the current value of range is the same as the previous current value and step;
- Method Setcustomvalidity (): Custom validation, parameters are prompt information.
- Property Customerror: Validation of custom validation, non-conformance to true, otherwise false.
HTML5 Self-study note [3] Forms validation feedback