Files
Global-Jain/app/Http/Requests/Api/Chaturmas/UpdateChaturmasRequest.php
2025-11-05 10:37:10 +05:30

46 lines
949 B
PHP

<?php
namespace App\Http\Requests\Api\Chaturmas;
use Illuminate\Foundation\Http\FormRequest;
class UpdateChaturmasRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'sant_id' => 'exists:sants,id',
'sagh_id' => 'exists:sanghs,id',
'place' => 'nullable',
'year' => 'required|exists:chaturmas_dates,id|date_format:Y',
];
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function message()
{
return [
'year.exists' => 'Chaturmas already exist for selected year.',
];
}
}