Add user email unique to CreateUserRequest only

This commit is contained in:
Nabeel Shahzad 2018-01-02 23:20:36 -06:00
parent 1b5107a085
commit 2bcfe76289

View File

@ -25,6 +25,8 @@ class CreateUserRequest extends FormRequest
*/
public function rules()
{
return User::$rules;
$rules = User::$rules;
$rules['email'] .= '|unique:users,email';
return $rules;
}
}