File "StoreContactQueryRequest.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Requests/Admin/StoreContactQueryRequest.php
File size: 1.01 KB
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Requests\Admin;
use App\Models\ContactQuery;
use Illuminate\Foundation\Http\FormRequest;
class StoreContactQueryRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'name' => [
'required',
'string',
'max:50',
],
'email' => [
'required',
'email',
],
'phone' => [
'required',
'max:20',
],
'department' => [
'required',
'in:'. implode(',',ContactQuery::DEPARTMENTS),
],
'subject' => [
'required',
'max:50',
],
'message' => [
'required',
],
'location_id' => [
'required',
'exists:store_locations,id',
],
];
}
}