File "UpdatePasswordRequest.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Requests/Admin/UpdatePasswordRequest.php
File size: 922 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Requests\Admin;
use Gate;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Response;
class UpdatePasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Gate::allows('profile_password_edit');
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'password' => ['required',
'confirmed',
'regex:/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/i',
],
];
}
public function messages()
{
return [
'password.regex' => 'Password should contain at least 8 characters, one letter, one number & one special character',
];
}
}