app/Http/Controllers/Auth/RegisterController.php
/**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
Get a validator for an incoming registration request.
@param  array  $data
@return \Illuminate\Contracts\Validation\Validator
Get a validator for an incoming registration request . @param array $data @return \ Illuminate \ Contracts \ Validation \ Validator
protected function validator(array $data)
    {
        $message = array(
            'required' => 'The :attribute field is required.',
            'email.email' => 'Please enter a valid email',
            'password.min:8' => 'You must enter a password that contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters!'
        );
        return Validator::make($data, $message, [
            'name' => ['required', 'string', 'max:255'],
            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
            'password' => ['required', 'string', 'min:8', 'confirmed'],
            'role' => ['required', 'string']
        ] );
    }
protected function validator ( array $ data ) { $ message = array ( 'required' => 'The :attribute field is required.' , 'email.email' => 'Please enter a valid email' , 'password.min:8' => 'You must enter a password that contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters!' ) ; return Validator :: make ( $ data , $ message , [ 'name' => [ 'required' , 'string' , 'max:255' ] , 'email' => [ 'required' , 'string' , 'email' , 'max:255' , 'unique:users' ] , 'password' => [ 'required' , 'string' , 'min:8' , 'confirmed' ] , 'role' => [ 'required' , 'string' ] ] ) ; }
Get a validator for an incoming registration request.
Get a validator for an incoming registration request .