Skip to content

feat: Add support for an error status and message in most form field components#659

Closed
gnapse wants to merge 3 commits intomainfrom
ernesto/field-error
Closed

feat: Add support for an error status and message in most form field components#659
gnapse wants to merge 3 commits intomainfrom
ernesto/field-error

Conversation

@gnapse
Copy link
Copy Markdown
Contributor

@gnapse gnapse commented May 18, 2022

Short description

This PR adds a semantic error message to most form field components.

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Executed npm run validate and made sure no errors / warnings were shown
  • Described changes in CHANGELOG.md
  • Bumped version in package.json and package-lock.json (npm --no-git-tag-version version <major|minor|patch>) ref
  • Updated all static build artifacts (npm run build-all)

Versioning

New minor release.

@gnapse gnapse requested a review from craigcarlyle May 18, 2022 19:54
@gnapse gnapse self-assigned this May 18, 2022
@gnapse gnapse changed the title refactor: Extract type alias feat: Add support for an error status and message in most form field components May 18, 2022
Copy link
Copy Markdown
Contributor

@craigcarlyle craigcarlyle left a comment

Choose a reason for hiding this comment

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

👏 Works well!

})

it('is marked as invalid and with an error message if an error message is given', () => {
render(<SelectField data-testid="select-field" label="Gender" error="Must select one" />)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we maybe change this label or error message?

Suggested change
render(<SelectField data-testid="select-field" label="Gender" error="Must select one" />)
render(<SelectField data-testid="select-field" label="Favourite ice cream flavour" error="Must select one" />)

@gnapse
Copy link
Copy Markdown
Contributor Author

gnapse commented Jun 1, 2022

Superseded by #667

@gnapse gnapse closed this Jun 1, 2022
@gnapse gnapse deleted the ernesto/field-error branch June 1, 2022 20:44
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