-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): Validate cron on update. Fixes #5691 #5692
Conversation
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Codecov Report
@@ Coverage Diff @@
## master #5692 +/- ##
=========================================
Coverage ? 46.96%
=========================================
Files ? 244
Lines ? 15214
Branches ? 0
=========================================
Hits ? 7145
Misses ? 7164
Partials ? 905
Continue to review full report at Codecov.
|
@@ -5,6 +5,9 @@ const x = require('cronstrue'); | |||
|
|||
export const ScheduleValidator = ({schedule}: {schedule: string}) => { | |||
try { | |||
if (schedule.split(' ').length === 6) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also provide an error message when length > 6 so users can be noted of mistakes earlier in the UI?
No description provided.