Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/app/Http/Requests/Landlord/LandlordRegistrationRequest.php
Назад
<?php namespace App\Http\Requests\Landlord; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Password; class LandlordRegistrationRequest 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 [ 'email' => [ 'email:rfc,dns', 'unique:users', 'required', ], 'firstname' => [ 'string', 'required' ], 'lastname' => [ 'string', 'required' ], 'property_name' => [ 'string', 'nullable' ], 'phone_number' => [ 'string', 'nullable', 'min:6' ], 'no_of_units' => [ 'numeric', 'nullable', 'max:5' ], 'lease_term' => [ 'string', 'required', ], 'rent_due_date' => [ 'date', 'after_or_equal:'.today(), 'nullable', ], 'available_date' => [ 'date', 'after_or_equal:'.today(), 'nullable', ], 'monthly_rent' => [ 'regex:/^\d{1,13}(\.\d{1,4})?$/', 'nullable', ], 'unit_size' => [ 'numeric', 'nullable', ], 'security_deposit' => [ 'regex:/^\d{1,13}(\.\d{1,4})?$/', 'nullable', ], 'amenities' => [ 'array', 'nullable', ], 'no_of_bathrooms' => [ 'required', ], 'no_of_bedrooms' => [ 'required', ], 'password' => [ Password::min(8)->mixedCase()->symbols(), 'required', ], 'country' => [ 'required', 'string', 'regex:/^[a-zA-Z\s]+$/', ], 'state' => [ 'required', 'string', ], 'zip_code' => [ 'required', 'string', ], ]; } /** * 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_number.min' => ':attribute should have at least 6 characters', 'phone_number.max' => ':attribute should have at least 12 characters', 'country.required' => ':attribute is required', 'country.string' => ':attribute must be a string', 'country.regex' => ':attribute must contain only letters and spaces', 'state.required' => ':attribute is required', 'state.string' => ':attribute must be a string', 'state.regex' => ':attribute must contain only letters and spaces', ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes() { return [ 'firstname' => 'First Name', 'lastname' => 'Last Name', 'address' => 'Property Address', 'email' => 'E-mail', 'password' => 'Password', 'phone_number' => 'Company Phone', 'property_name' => 'Company Name', 'no_of_units' => 'Number Of Units', 'lease_term' => 'Lease Term', 'rent_due_date' => 'Rent Due Date', 'monthly_rent' => 'Monthly Rent', 'unit_size' => 'Unit Size', 'security_deposit' => 'Security Deposit', 'amenities' => 'Amenities', 'no_of_bedrooms' => 'Number Of Bedrooms', 'no_of_bathrooms' => 'Number Of Bathrooms', 'available_date' => 'Date Available' ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка