mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 13:38:20 +01:00
Check for unique user and email. Closes #2118
This commit is contained in:
parent
b40066b20e
commit
6ce4348a28
@ -106,8 +106,8 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
* @var string[]
|
||||
*/
|
||||
public $rules = [
|
||||
'username' => ['required', 'regex:/\A(?!.*[:;]-\))[ -~]+\z/'],
|
||||
'email' => 'required|email',
|
||||
'username' => ['required', 'regex:/\A(?!.*[:;]-\))[ -~]+\z/', 'unique:users,username'],
|
||||
'email' => 'required|email|unique:users,email',
|
||||
'password' => 'required',
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user