Skip to content

Commit

Permalink
Merge pull request #1102 from umer936/patch-1
Browse files Browse the repository at this point in the history
Split rule name for the Rule Checker
  • Loading branch information
steinkel authored Oct 28, 2024
2 parents 85f055d + b1c6370 commit 8f8350a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/Table/UsersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ public function validationRegister(Validator $validator)
*/
public function buildRules(RulesChecker $rules): RulesChecker
{
$rules->add($rules->isUnique(['username']), '_isUnique', [
$rules->add($rules->isUnique(['username']), '_isUniqueUsername', [
'errorField' => 'username',
'message' => __d('cake_d_c/users', 'Username already exists'),
]);

if ($this->isValidateEmail) {
$rules->add($rules->isUnique(['email']), '_isUnique', [
$rules->add($rules->isUnique(['email']), '_isUniqueEmail', [
'errorField' => 'email',
'message' => __d('cake_d_c/users', 'Email already exists'),
]);
Expand Down

0 comments on commit 8f8350a

Please sign in to comment.