['nullable', 'date', 'before_or_equal:today'], 'report_type' => ['nullable', 'string', Rule::in(array_keys(AiReport::REPORT_TYPES))], ]; } public function messages(): array { return [ 'report_date.before_or_equal' => __('validation.before_or_equal', [ 'attribute' => __('validation.attributes.report_date'), 'date' => __('validation.attributes.today'), ]), 'report_type.in' => __('validation.in', ['attribute' => __('validation.attributes.report_type')]), ]; } }