HTML5 new client-side checksum

Source: Internet
Author: User

1. Perform a checksum using the Check property

  • Required: This property specifies that the form control must be filled in.
  • Pattern: This property specifies that the value of this form control must conform to the specified regular expression.
  • Min, Max, step: These 3 attribute values are valid for numeric types, <input.../> elements of date types.

2. Call the Checkvalidity method to verify

If the form object calls the Checkvalidate () method, returning True indicates that all form controls in the form are valid.

3. Custom error Prompts

HTML5 the new Setcustomvalidity () method allows you to implement custom error prompts.

4. Close the check

  • Add Novalidate property for <form.../>.
  • Set the Formnovalidate property for the <input.../> or <button.../> element of type= "submit".

HTML5 new client-side checksum

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.