28 lines
560 B
PHP
28 lines
560 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ChangePass extends FormRequest{
|
|
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules()
|
|
{
|
|
return [
|
|
'password' => 'required|min:6|max:10|confirmed',
|
|
'password_old' => 'required',
|
|
];
|
|
}
|
|
public function messages(){ //if i want to change the errors mgs!
|
|
return [
|
|
'password.min' => 'password needs to be Between 6-10 chars',
|
|
'password_old.required' => 'the Old Password is required',
|
|
|
|
];
|
|
}
|
|
}
|