Eshop-Laravel/app/Http/Requests/ChangePass.php
2019-10-18 12:25:37 +03:00

29 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',
];
}
}