예제 #1
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), ['status' => ['array', 'in:open,new,closed,resolved'], 'assigned_id' => ['array', 'exists:users,id,is_staff,1'], 'dept_id' => ['array', 'exists:depts,id'], 'priority' => ['array', 'between:1,5'], 'created_at' => []]);
 }
예제 #2
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), ['status' => ['regex:/^(-?(open|closed|new)){1,3}$/'], 'staff_id' => ['regex:/^\\d+(-\\d+)*$/']]);
 }
예제 #3
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), []);
 }