Eshop-Laravel/app/Http/Requests/ChangePass.php

29 lines
560 B
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
<?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',
];
}
}