PHP Specific Validation form flow

Source: Internet
Author: User

For example, I have to verify that he can not be empty specific JS and php how to verify it is the point of submission that the moment does not conform to the mouse leave also to remind me that every time you know to verify but the specific process sequence do not know how to walk is the definition of the method ah or how to ask the high finger teaching

Reply content:

For example, I have to verify that he can not be empty specific JS and php how to verify it is the point of submission that the moment does not conform to the mouse leave also to remind me that every time you know to verify but the specific process sequence do not know how to walk is the definition of the method ah or how to ask the high finger teaching

Recommended to use angular on the JS side, combined with w5c validate, it is easy to achieve, save 70% code volume than the above several answers

Of course, the server should do another test.

Front-end JS or jquery do a school check, combined with form events to write code. Back-end PHP to receive the $_post is doing a school check. Don't feel trouble because it can be forged.

Front-end form calibration Recommended plugin: Official dome

and download address: Download address

First of all, JS verification is only to improve the user experience, PHP must go through the verification process, which is safe.
Verification process, depending on your needs, such as you want to leave the mouse to verify, then in the input box monitoring Blur event, the event to determine whether the values meet the requirements, non-compliance with the return of false, to do the corresponding hint, if the requirements of the direct submission to the background, PHP to do the verification of the values of each.

Mobile phone code word, only say the idea does not knock code.

Before submitting a decision, it is not necessary to use any other frame, when you click the Submit button to judge the

  • 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.