Skip to content

Conversation

@jocmp
Copy link
Contributor

@jocmp jocmp commented Dec 29, 2022

Using the CronExpression library, this addition ensures that a cron expression is valid in settings before allowing the user to save it.

Addresses #278

Other notes

The ValidCronExpression Laravel rule was generated using the following command

php artisan make:rule ValidCronExpression --invokable

Before

Invalid cron expressions are saved without an error.

Screenshot 2022-12-29 141847

After

On Save, invalid cron expressions are not saved and the error is reflected in a UI message.

Screenshot_20221229_022350

@jocmp jocmp requested a review from alexjustesen as a code owner December 29, 2022 20:28
@alexjustesen alexjustesen added the feature New feature or request label Jan 3, 2023
@alexjustesen
Copy link
Owner

@jocmp thanks for the PR! Can you do me a quick favor and address the code quality issues pint flagged? If you want to check locally you can run sail pint --test -v if you're using Sail.

jocmp added 2 commits January 3, 2023 18:22
Using the CronExpression library, this addition ensures
that a cron expression is valid in settings before allowing the
user to save it.
@jocmp jocmp force-pushed the jc/validate-cron-expression branch from 33933a0 to e51ee63 Compare January 4, 2023 00:22
@jocmp
Copy link
Contributor Author

jocmp commented Jan 4, 2023

@alexjustesen sure thing. the branch is now up-to-date with those lints.

@alexjustesen alexjustesen merged commit 226d33a into alexjustesen:main Jan 4, 2023
@jocmp jocmp deleted the jc/validate-cron-expression branch January 4, 2023 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants