Skip to content

Find existing errors in added validation group#333

Merged
mjbp merged 2 commits into
masterfrom
feature/update-to-avoid-duplicate-error-message
Apr 21, 2026
Merged

Find existing errors in added validation group#333
mjbp merged 2 commits into
masterfrom
feature/update-to-avoid-duplicate-error-message

Conversation

@sarah-richards-stormid
Copy link
Copy Markdown
Contributor

@sarah-richards-stormid sarah-richards-stormid commented Feb 24, 2026

Due to some new functionality around an 'add another' form type, there's a possibility that a form group could be added to the validator in a pre-existing errored state with a server error node.

The errored state is picked up if an input starts that way on page load (using the findErrors utility called by getInitialState) but it isn't also scanned for when a group is added by the API addGroup method.

I've added a call to the utility as part of the reducer - if thats the best place to do this?

Comment thread packages/validate/src/lib/reducers/index.js Outdated
Comment thread packages/validate/src/lib/reducers/index.js
@sarah-richards-stormid
Copy link
Copy Markdown
Contributor Author

Updates pushed! Thanks for the review - happy to make changes and get it clean and complete just now!

@mjbp mjbp merged commit e717183 into master Apr 21, 2026
1 check passed
@mjbp mjbp deleted the feature/update-to-avoid-duplicate-error-message branch April 21, 2026 11:29
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.

2 participants