app/Http/Controllers/Auth/LoginController.php
/**
     * Validate the user login request.
     *
     * @param Request $request
     */
Validate the user login request.
@param Request $request
Validate the user login request . @param Request $request
protected function validateLogin(Request $request)
    {
        $messages = [
            'data.required' => __('El campo usuario o correo electrónico es obligatorio.'),
            'username.required' => __('El campo usuario o correo electrónico es obligatorio.'),
            'password.required' => __('El campo contraseña es obligatorio.'),
            'g-recaptcha-response.required_if' => __('El campo :attribute es obligatorio.', ['attribute' => 'CAPTCHA']),
        ];
        $request->validate([
            $this->username() => 'required|string',
            'password' => PasswordRules::login(),
            'g-recaptcha-response' => ['required_if:captcha_status,true', 'captcha'],
        ], $messages);
    }
protected function validateLogin ( Request $ request ) { $ messages = [ 'data.required' => __ ( 'El campo usuario o correo electrónico es obligatorio.') , 'username.required' => __ ( 'El campo usuario o correo electrónico es obligatorio.') , 'password.required' => __ ( 'El campo contraseña es obligatorio.') , 'g-recaptcha-response.required_if' => __ ( 'El campo :attribute es obligatorio.' , [ 'attribute' => 'CAPTCHA' ] ) , ] ; $ request -> validate ( [ $ this -> username ( ) => 'required|string' , 'password' => PasswordRules :: login ( ) , 'g-recaptcha-response' => [ 'required_if:captcha_status,true' , 'captcha' ] , ] , $ messages ) ; }
Validate the user login request.
Validate the user login request .