| Server IP : 13.235.167.51 / Your IP : 216.73.217.116 Web Server : Apache System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64 User : root ( 0) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/app.machinox.in/app/Http/Requests/WebService/UserRequests/ |
Upload File : |
<?php
namespace App\Http\Requests\WebService\UserRequests;
use Illuminate\Foundation\Http\FormRequest;
class AddressRequest extends FormRequest
{
protected $stopOnFirstFailure = true;
/**
* 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<mixed>|string>
*/
public function rules(): array
{
return [
'address' => 'nullable|string|max:255',
'city' => 'nullable|string|max:255',
'state' => 'nullable|string|max:255',
'pincode' => 'nullable|numeric|max:255',
'latitude' => 'nullable|numeric|between:-90,90',
'longitude' => 'nullable|numeric|between:-180,180',
];
}
public function attributes()
{
return [
'address' => trans('messages.ADDRESS'),
'city' => trans('messages.CITY'),
'pincode' => trans('messages.PINCODE'),
'state' => trans('messages.STATE'),
'latitude' => trans('messages.LATITUDE'),
'longitude' => trans('messages.LONGITUDE'),
];
}
public function messages()
{
return [
'address.string' => trans('messages.ADDRESS_STRING'),
'city.string' => trans('messages.CITY_STRING'),
'state.string' => trans('messages.STATE_STRING'),
'pincode.numeric' => trans('messages.PINCODE_NUMERIC'),
'latitude.numeric' => trans('messages.LATITUDE_NUMERIC'),
'latitude.between' => trans('messages.LATITUDE_BETWEEN'),
'longitude.numeric' => trans('messages.LONGITUDE_NUMERIC'),
'longitude.between' => trans('messages.LONGITUDE_BETWEEN'),
];
}
}