Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
peripherad
/
app
/
Http
/
Requests
/
Admin
:
UpdatePasswordRequest.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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', ]; } }