mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Use only custom validation
This commit is contained in:
@@ -128,7 +128,7 @@ class RegisterController extends Controller
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'username' => ['required', 'string', 'min:5', 'max:255', 'unique:users'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users', 'indisposable', new ValidEmailDomain()],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users', new ValidEmailDomain()],
|
||||
'password' => ['required', 'confirmed', Password::min(8)->letters()->mixedCase()->numbers()->symbols()->uncompromised()],
|
||||
], [
|
||||
'password.min' => 'The password must be at least 8 characters.',
|
||||
|
||||
@@ -132,7 +132,7 @@ class ProfileController extends BasePageController
|
||||
return redirect()->to('profileedit');
|
||||
case 'submit':
|
||||
$validator = Validator::make($request->all(), [
|
||||
'email' => ['nullable', 'string', 'email', 'max:255', 'unique:users,email,'.$userid, 'indisposable', new ValidEmailDomain()],
|
||||
'email' => ['nullable', 'string', 'email', 'max:255', 'unique:users,email,'.$userid, new ValidEmailDomain()],
|
||||
'password' => ['nullable', 'string', 'min:8', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/'],
|
||||
]);
|
||||
|
||||
|
||||
+1
-1
@@ -563,7 +563,7 @@ class User extends Authenticatable
|
||||
if ($validate) {
|
||||
$validator = Validator::make($user, [
|
||||
'username' => ['required', 'string', 'min:5', 'max:255', 'unique:users'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users', 'indisposable', new ValidEmailDomain()],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users', new ValidEmailDomain()],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/'],
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user