Update regex for first name/last name to allow letters, hyphens, apostrophes, spaces, periods, and diacritics.
Add title to TextInputs to display validation rule on tooltip message
Related Issue
Fixes #56
Acceptance Criteria
Patient form field accepts a reasonable (up to the dev to determine what reasonable means!) set of patient names, which would include dashes / apostrophes etc. that might show up in a name
When an input fails validation, the tooltip should now display details on acceptable input characters like so:
Additional Information
There's an argument to be made (see USWDS Usability Guidance) that we shouldn't restrict characters at all; however, this PR's changes align with current usage on various other HHS sites.
The browser tooltip for error handling isn't great for a11y either, so I'd recommend some future work on inline error styling a là the CMS Design System
Checklist
[ ] If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)
PULL REQUEST
Summary
title
toTextInput
s to display validation rule on tooltip messageRelated Issue
Fixes #56
Acceptance Criteria
Patient form field accepts a reasonable (up to the dev to determine what reasonable means!) set of patient names, which would include dashes / apostrophes etc. that might show up in a name
Allowed characters were chosen based on USWDS Guidance and HealthCare.gov validation rules/messaging
Some names that should pass validation:
Some names that should fail validation:
When an input fails validation, the tooltip should now display details on acceptable input characters like so:
Additional Information
There's an argument to be made (see USWDS Usability Guidance) that we shouldn't restrict characters at all; however, this PR's changes align with current usage on various other HHS sites.
The browser tooltip for error handling isn't great for a11y either, so I'd recommend some future work on inline error styling a là the CMS Design System
Checklist