Astro actions not validate fields without client side #11681
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: actions
Related to Astro actions (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Not relevant
Describe the Bug
Astro zod validations are not happening. Input fields error when using astro actions with pure html solution without client side code are not retrieved as RFC explains by using
Astro.getActionResult
andisInputError
.Also when I use custom client side by using native html I can not see any field error if I sent a less length than minimum (for example). So I need to do all validations by my own because no error is retrieved when fields does not respect the declared zod Schema.
What's the expected result?
I expect that input stuff as zod Scheme return error in fields as rfc explains but I got no error in inputs. I can not also retrieve custom error for fields (I mean I can not use ActionInputError) and I have to return generic errors or do my own validation/impletation for this.
Not sure if this is the expected behaviour.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-r9u7nb-deyhwl?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: