ekart/backend/app/Http/Requests/UpdateUserAddressRequest.php
kusowl c27ae1969f feature: add address api
- users can save, edi and delete addresses
- each user can have multiple address
- used shallow routes for address
2026-03-13 18:08:45 +05:30

36 lines
911 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class UpdateUserAddressRequest 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, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'firstName' => 'sometimes|string|min:3|max:50',
'lastName' => 'sometimes|string|min:3|max:50',
'street' => 'sometimes|string|min:3|max:100',
'city' => 'sometimes|string|min:3|max:20',
'state' => 'sometimes|string|min:3|max:40',
'pinCode' => 'sometimes|string|min:3|max:10',
];
}
}