HTML5 Self-study note [3] Forms validation feedback

Source: Internet
Author: User

The validity object of a form control object can set or return related validation information (Gets the validity object in invalid event processing):

  1. Property valid: True for all validations passed, for false at least one validation failure.
  2. 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.
  3. Property Typemismatch: This property is true if the input content does not conform to the control type requirement, otherwise false.
  4. Property Patternmismatch: When the input does not match the regular expression, the property is true, otherwise false.
  5. Property Toolong: The property is true if the input exceeds the preset maximum length, otherwise false.
  6. 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.
  7. Attribute Rangeoverflow: With Rangeunderflow, there is no egg to use.
  8. Property Stepmismatch: Verifies whether the current value of range is the same as the previous current value and step;
  9. Method Setcustomvalidity (): Custom validation, parameters are prompt information.
  10. Property Customerror: Validation of custom validation, non-conformance to true, otherwise false.

HTML5 Self-study note [3] Forms validation feedback

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.