check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'uuid' => 'required|min:3|max:255', 'title' => 'required|min:3|max:255', 'type' => 'required|min:3|max:255', 'directory_id' => 'sometimes|nullable|integer', 'document_id' => 'sometimes|nullable|integer', 'path' => 'required|min:3|max:255', 'lang' => [ 'required', new EnumIsValidRule(LangEnum::class) ], ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes() { return [ 'title' => \trans('titre'), ]; } }