Skip to content

Comments

fix(web): improve error message for required fields#3209

Merged
JGAntunes merged 2 commits intomainfrom
jgantunes/sc-130954/improve-error-message-when-required-fields
Dec 3, 2025
Merged

fix(web): improve error message for required fields#3209
JGAntunes merged 2 commits intomainfrom
jgantunes/sc-130954/improve-error-message-when-required-fields

Conversation

@JGAntunes
Copy link
Contributor

@JGAntunes JGAntunes commented Nov 14, 2025

What this PR does / why we need it:

Improve msging for when form submission fails with required fields missing.

image

Which issue(s) this PR fixes:

https://app.shortcut.com/replicated/story/130954/improve-error-message-when-required-fields-aren-t-filled-in-on-config-page

Does this PR require a test?

Yes, updated the unit tests.

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

diamonwiggins
diamonwiggins previously approved these changes Nov 14, 2025
Copy link
Contributor

@diamonwiggins diamonwiggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me

// Helper function to get the general error message we show at the bottom of the page after a form submission
export function getGeneralErrorMsgForSubmission(error: ApiError) {
if (error.fieldErrors && error.fieldErrors.length > 0) {
return "Required items are missing"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have regexp validation. Should we make this error more generic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the callout, changed the msging via - d6ba1eb

@JGAntunes JGAntunes force-pushed the jgantunes/sc-130954/improve-error-message-when-required-fields branch from 25c1507 to d6ba1eb Compare December 3, 2025 10:41
@JGAntunes JGAntunes dismissed emosbaugh’s stale review December 3, 2025 17:14

Addressed the feedback.

@JGAntunes JGAntunes merged commit e875af5 into main Dec 3, 2025
27 checks passed
@JGAntunes JGAntunes deleted the jgantunes/sc-130954/improve-error-message-when-required-fields branch December 3, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants