mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-23 11:08:13 -05:00
31 lines
697 B
PHP
31 lines
697 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Requests\User;
|
||
|
|
||
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
||
|
class UserChangePassword extends FormRequest
|
||
|
{
|
||
|
/**
|
||
|
* Get the validation rules that apply to the request.
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function rules()
|
||
|
{
|
||
|
return [
|
||
|
'old_password' => 'required',
|
||
|
'new_password' => 'required|min:8'
|
||
|
];
|
||
|
}
|
||
|
|
||
|
public function messages()
|
||
|
{
|
||
|
return [
|
||
|
'old_password.required' => __('Old password cannot be empty'),
|
||
|
'new_password.required' => __('New password cannot be empty'),
|
||
|
'new_password.min' => __('Password must be greater than 8 digits')
|
||
|
];
|
||
|
}
|
||
|
}
|