Thinkphp verification problems

Source: Internet
Author: User
The user name must be verified during login and registration. However, during login, the user name must be verified to be empty and whether the user name exists;
But verification is also required during registration. are the two verification items the same? SOS


Reply to discussion (solution)

Different. you can control the parameters to ensure which operation each verification applies.
Http://doc.thinkphp1.cn/manual/auto_validate.html

?? ? Is Cheng Yi? .

But? Parcel determination? Yes ??
Login ?, Use? No name? Is it null and can be accessed only when it exists?

???, Use? No name? Null and does not exist? (Same use? The name cannot be duplicated ???)

The two verification methods are the same.

Similarly, if the verification is empty, use js to determine whether the database needs to be queried in the background, and then determine whether the database exists.

In fact, I would like to ask if it has the same functions as the scenario settings in the YII Framework;
In TP, the verification format array (verification field, verification rule, error prompt, [verification condition, additional rule, verification time]) should be distinguished when the verification time is set? This is what the teacher said.

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.