Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Allow raising errors from within a custom whatever(#2718) #4188

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

abdalla-rko
Copy link
Contributor

Reasons for making this change

I introduced a raiseFieldErrors method to raise errors from within a custom component(see #2718).

The current behavior allows errors to be raised from custom components and when the form onChange is triggered, we clear the custom raised errors. I appreciate any feedback on this approach. If everything looks good, I'll write tests and implement this in other themes.

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@heath-freenome
Copy link
Member

heath-freenome commented May 10, 2024

@abdalla-rko If the goal is to update the errorSchema via a custom widget, maybe it makes sense to update the onChange in WidgetProps to function similarly to the onChange in FieldProps, where the errorSchema can be updated as it is flows through the schema hierarchy. Feel free to join the next meeting so we can talk about it. Or reach out to me on Discord

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

Successfully merging this pull request may close these issues.

None yet

2 participants