cron-atlas icon indicating copy to clipboard operation
cron-atlas copied to clipboard

Improve Form Validation handling

Open pmbanugo opened this issue 6 months ago • 4 comments

The forms currently only have basic client-side validation. The application should also do server-side validation, so that only valid data will be saved. It should ensure that:

  • required fields are submitted
  • the schedule value is properly checked based on the schedule type (e.g. cron expression or interval).
  • clear messaging for form validation errors.

This could be implemented in a simplistic way using epicweb-dev/invariant. An alternative is to use Conform and Valibot. The following guides by Kent Dodds shows how to use it in Remix.

pmbanugo avatar Dec 21 '23 09:12 pmbanugo

Side note: perhaps root/apex domains like google.com should not be allowed because it's a waste of resource if they keep running and are not useful to the end user.

pmbanugo avatar Jan 01 '24 21:01 pmbanugo

@pmbanugo i will take that

abakermi avatar Jan 29 '24 09:01 abakermi

Just FYI, I’d like prefer if you used Valibot instead of Zod.

pmbanugo avatar Jan 29 '24 10:01 pmbanugo

@pmbanugo ok

abakermi avatar Jan 29 '24 10:01 abakermi