| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- use Illuminate\Validation\Rule;
- class RegisterClientRequest extends FormRequest
- {
- public function rules(): array
- {
- $rules = [
- 'email' => 'sometimes|email',
- 'phone' => 'sometimes|string|nullable',
- 'name' => 'required|string|max:255',
- 'code' => 'required|string|max:6',
- 'document' => [
- 'sometimes',
- 'string',
- ],
- 'zip_code' => 'sometimes|string|max:20',
- 'address' => 'sometimes|string|max:255',
- 'has_complement' => 'sometimes|boolean',
- 'nickname' => 'sometimes|string|max:255',
- 'instructions' => 'sometimes|string|max:255',
- 'address_type' => 'sometimes|string|max:255',
- 'city' => 'sometimes|string|max:255',
- 'state' => 'sometimes|string|max:255',
- ];
- return $rules;
- }
- }
|