first commit

This commit is contained in:
Eric Li
2025-06-13 12:09:50 +08:00
commit b12cd07419
545 changed files with 39389 additions and 0 deletions

View File

@ -0,0 +1,57 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class EventHealthAllowanceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function rules()
{
return [
'hospital_name' => 'required|min:2',
'name' => 'required|min:1|max:128',
'twid' => 'required|isNI',
'phone' => 'required|phone:TW',
'email' => 'required|email',
'address' => 'required|min:5',
'check_reson' => 'required_if:check_state,3',
];
}
/**
* Get the validation attributes that apply to the request.
*
* @return array
*/
public function attributes()
{
return [
'hospital_name' => '就醫院所',
'name' => '姓名',
'twid' => '身份證字號',
'phone' => '行動電話',
'email' => '電子信箱',
'address' => '收件地址'
];
}
/**
* Get the validation messages that apply to the request.
*
* @return array
*/
public function messages()
{
return [
'twid.is_n_i' => '身份證字號驗證有誤',
'phone.phone' => '行動電話驗證有誤',
'check_reson.required_if' => '當審核狀態為「未通過」時,必需填寫「審核回應」欄位'
];
}
}