check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { /** @var \Ldc\LDCCRM\Models\Customer */ $crmCustomer = \auth('frontend')->user()->api_data; return [ 'old_password' => [ 'required', new CrmCustomerPassword($crmCustomer) ], 'password' => [ 'required', 'string', 'max:255', 'confirmed', Password::min(8)->mixedCase()->letters()->numbers()->uncompromised() ] ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes() { return [ 'old_password' => trans('ancien mot de passe'), 'password' => trans('mot de passe'), ]; } }