Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/app/Http/Requests/Admin/LandlordCreateRequest.php
Назад
<?php namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Password; class LandlordCreateRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string> */ public function rules(): array { return [ 'name' => [ 'string', 'required', ], 'email' => [ 'required', 'email', 'unique:users', ], 'phone' => [ 'min:6', 'max:12', 'nullable', ], 'password' => [ 'required', Password::min(8)->mixedCase()->symbols(), ], ]; } /** * Get the error messages for the defined validation rules. * * @return array */ public function messages() { return [ 'name.required' => ':attribute is required', 'name.alpha' => ':attribute must contain only alphabets', 'email.unique' => ':attribute already exists', 'email.email' => 'Please enter a valid :attribute', 'password.regex' => ':attribute must include an upper case and lower case char', 'password.min' => ':attribute should have at least 8 characters', 'phone.min' => ':attribute should have at least 6 characters', 'phone.max' => ':attribute should have at least 12 characters', ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes() { return [ 'name' => 'Name', 'email' => 'E-mail', 'password' => 'Password', 'phone' => 'Phone' ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка