Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Required fields are not validated on submission #60

Closed
IAmNatch opened this issue Aug 28, 2023 · 3 comments
Closed

Required fields are not validated on submission #60

IAmNatch opened this issue Aug 28, 2023 · 3 comments

Comments

@IAmNatch
Copy link

Issue
Ideally, form values should be validated server-side as well as client side. While the "required" field is passed to the client side, no validation is implemented on the client side.

Solution
This could likely be solved with a beforeValidate hook that fetches the related form, and ensures each required field is present.

@jacobsfletch
Copy link
Member

Hey @IAmNatch, this might be duplicative of #50, what do you think? If you want to leave a comment of support in that issue I will close this one out so we can consolidate the two.

@IAmNatch
Copy link
Author

Hey @jacobsfletch, you're right, this does look like a duplicate. I'll aim to put up a PR for #50 this week, utilizing beforeValidate if that sounds good to you.

@jacobsfletch
Copy link
Member

jacobsfletch commented Aug 28, 2023

@IAmNatch that would be amazing. Although I think the right way to do this would be to use the normal field-level validations and not a custom hook. We can talk about this more in the other ticket or in a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants