Edit File: AdminUpdatePasswordRequest.php
<?php namespace App\Http\Requests; use App\Rules\CheckPassword; use Illuminate\Foundation\Http\FormRequest; class AdminUpdatePasswordRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { // dd($this); return [ 'old_password' => ['required', new CheckPassword()], 'password' => 'required|min:6|confirmed', 'password_confirmation' => 'required', ]; } public function messages() { return [ 'old_password.required' => 'يجب ادخال كلمه المرور القديمه', 'password.required' => 'يجب ادخال كلمه المرور', 'password.min' => 'كلمه المرور يجب ان لا تقل عن 6 حروف', 'password_confirmation.required' => 'يجب تاكيد كلمه المرور', 'password.confirmed' => 'كلمتان المرور غير متطابقتنان ', ]; } }
Back to File Manager