Disable account registering from disabled email provider

This commit is contained in:
Peter Papp
2021-07-23 13:28:40 +02:00
parent 8951ebc69f
commit eaec744356
30 changed files with 733 additions and 71 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace App\Users\Requests;
use App\Users\Rules\EmailProvider;
use App\Users\Rules\PasswordValidationRules;
use Illuminate\Foundation\Http\FormRequest;
class RegisterUserRequest extends FormRequest
{
use PasswordValidationRules;
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email', new EmailProvider],
'name' => 'required|string|max:255',
'password' => $this->passwordRules(),
];
}
}