*/ public function rules(): array { return [ 'name' => ['required', 'string', 'max:255'], 'slug' => ['required', 'string', 'max:255', 'regex:/^[a-z0-9-]+$/'], 'start_date' => ['required', 'date'], 'end_date' => ['required', 'date', 'after_or_equal:start_date'], 'timezone' => ['sometimes', 'string', 'max:50'], 'status' => ['sometimes', 'string', 'in:draft,published,registration_open,buildup,showday,teardown,closed'], 'parent_event_id' => ['nullable', 'ulid', Rule::exists('events', 'id')->where('organisation_id', $this->route('organisation')->id)], 'event_type' => ['nullable', 'in:event,festival,series'], 'event_type_label' => ['nullable', 'string', 'max:50'], 'sub_event_label' => ['nullable', 'string', 'max:50'], 'registration_show_section_preferences' => ['nullable', 'boolean'], 'registration_show_availability' => ['nullable', 'boolean'], ]; } }