(mode: ScheduleInputMode, defaultInput?: string, scheduleFormInputTypes?: any[])
| 599 | * |
| 600 | */ |
| 601 | export const isScheduleInputValid = (mode: ScheduleInputMode, defaultInput?: string, scheduleFormInputTypes?: any[]): boolean => { |
| 602 | if (mode === 'none') return true |
| 603 | if (mode === 'form') return Array.isArray(scheduleFormInputTypes) && scheduleFormInputTypes.length > 0 |
| 604 | return !!defaultInput && defaultInput !== '<p></p>' |
| 605 | } |
| 606 | |
| 607 | /** |
| 608 | * Determines if a schedule can be enabled based on its inputs: cron validity, |
no outgoing calls
no test coverage detected