app/Http/Requests/User/RegisterRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'first_name' => [
                'required',
                'string',
            ],
            'last_name' => [
                'required',
                'string',
            ],
            'username' => [
                'required',
                'string',
                'min:5',
                'max:25',
                Rule::unique('users', 'username'),
            ],
            'email' => ['required', 'string', 'email', Rule::unique('users')],
            'password' => PasswordRules::register($this->email),
            'g-recaptcha-response' => ['required_if:captcha_status,true', 'captcha'],
        ];
    }
public function rules ( ) { return [ 'first_name' => [ 'required' , 'string' , ] , 'last_name' => [ 'required' , 'string' , ] , 'username' => [ 'required' , 'string' , 'min:5' , 'max:25' , Rule :: unique ( 'users' , 'username' ) , ] , 'email' => [ 'required' , 'string' , 'email' , Rule :: unique ( 'users' ) ] , 'password' => PasswordRules :: register ( $ this -> email ) , 'g-recaptcha-response' => [ 'required_if:captcha_status,true' , 'captcha' ] , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .