ldc-boutique-cnc-sable/app/Http/Requests/CustomerUpdatePassword.php

41 lines
924 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rules\Password;
class CustomerUpdatePassword extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
return \auth('customer')->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'password_old' => 'required',
'password' => [
2023-08-03 09:15:22 +00:00
'required', 'required_with:password_confirmation', 'confirmed', 'max:255',
Password::min(8)
->mixedCase()
->letters()
->numbers()
->symbols()
->uncompromised()
],
];
}
}