Skip to content

Conversation

@JGAntunes
Copy link
Member

@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

Copy link
Member

@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?

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