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

Return a more helpful server side validation message #25823

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MegaphoneJon
Copy link
Contributor

Overview

Presently, a FormBuilder form that fails server-side validation doesn't give a helpful message to the user. This makes it hard to fix their error.

Before

Selection_1813

After

Selection_1814

Comments

See also #25533.

@civibot
Copy link

civibot bot commented Mar 15, 2023

(Standard links)

@civibot civibot bot added the master label Mar 15, 2023
@mattwire
Copy link
Contributor

@MegaphoneJon test fails related

@MegaphoneJon
Copy link
Contributor Author

test this please

@MegaphoneJon MegaphoneJon force-pushed the server-side-validation-message branch from 476297f to f72219d Compare August 3, 2023 14:58
@mattwire
Copy link
Contributor

jenkins test this please

@mattwire
Copy link
Contributor

@MegaphoneJon Looks like tests need updating for the more specific validation messages.

@MegaphoneJon
Copy link
Contributor Author

@eileenmcnaughton @mattwire I looked at this yesterday - and what I decided is that these errors need to be cleaned up in conjunction with this. "Illegal value for test_af_fields: contact_ref." is more helpful than "Validation Error" but I think it'd be far better to have a more user-friendly message.

@colemanw
Copy link
Member

@MegaphoneJon is label cleanup something you'd like help with ?

@MegaphoneJon
Copy link
Contributor Author

@MegaphoneJon is label cleanup something you'd like help with ?

I never volunteered to clean up the labels :) But if someone does, I'll update the affected tests to match the new labels.

I'll also say that we shouldn't get too hung up on this, because I think it'd be valuable to have more or less verbose messages based on a debug mode. Form builders and end users have different needs here.

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

Successfully merging this pull request may close these issues.

4 participants