If you are adding an interface, the validation rules generally
Query SQL is like this
Because of the definition of a separate validation class, if you want to add some variables in the manual, what do you do??? (Not enough to see other uses to validate the introduction of external variables in a standalone class)
Rules like this, normal in the editing interface validation, the submission of their own data will often prompt repetition,
No solution has been found before and no suitable solution is found on the network
Today, if the primary key ID is also passed as data to the authenticator in the form (name is the same name as the primary key)
Add this sentence.
Validation rules are not changed, and validation SQL statements change automatically when validating
It also shows that if the primary key value is passed in the validation data, the data of the ID of the incoming primary key is excluded when validating uniqueness.
It's not in the manual. This way, you can exclude a primary key. (Do not know if the manual is updated) to try a few pages of verification can be.
Specific reasons, later have to go to see the source, for the time being not in-depth study.
If there is an expert who is willing to give a nudge, would like to smell its detailed haha
About uniqueness in the ThinkPHP5 validator unique authentication problem