check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'question' => 'required|string|min:3|max:255', 'answer' => 'required|string|min:3|max:255', 'theme_id' => 'required|exists:faq_themes,id', ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'question' => trans('Question'), 'answer' => trans('Réponse'), 'theme_id' => trans('Thème associé'), ]; } }