Validated form controls: Add more validation examples
What?
Adds two more examples to the Validated form control stories:
- Validate with other field state
- Validate on submit
Why?
Developers were asking about this kind of use case.
Testing Instructions
See the new stories in the "Validated form controls" Overview section.
Screenshots or screencast
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
Co-authored-by: mirka <[email protected]>
Co-authored-by: getdave <[email protected]>
Co-authored-by: juanfra <[email protected]>
Co-authored-by: aduth <[email protected]>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Small nit: we might want to mark the fields in both examples as required. If someone submits with empty fields, it can feel like the validation isnβt working since the form still goes through. Not specific to the stories, more of a UX detail.
Good call (a05c559). Thanks for keeping an eye on the UX details π
Flaky tests detected in a05c55957094e43be70133a1e5de770c7e9ca1cd. Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
π Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19638032155 π Reported issues:
- #47897 in
/test/e2e/specs/site-editor/template-revert.spec.js