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.