AddressEditRequest.php 932 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Request\Api\v1\User;
  4. use Hyperf\Validation\Request\FormRequest;
  5. class AddressEditRequest extends FormRequest
  6. {
  7. /**
  8. * Determine if the user is authorized to make this request.
  9. */
  10. public function authorize(): bool
  11. {
  12. return true;
  13. }
  14. /**
  15. * Get the validation rules that apply to the request.
  16. */
  17. public function rules(): array
  18. {
  19. return [
  20. 'id' => 'required|integer:strict',
  21. 'name' => 'required|string',
  22. 'area_code' => 'required|string',
  23. 'phone' => 'required|string',
  24. 'address' => 'required|string',
  25. 'detail_address' => 'required|string',
  26. 'postal_code' => 'required|string',
  27. 'lng' => 'required|string',
  28. 'lat' => 'required|string',
  29. ];
  30. }
  31. }