mi6 / mi6/ic-ui-kit

Update all input components that have validation to allow status messages to be overridden.

Open
#605 1 comment 0 reactions 0 assignees View on GitHub
all components
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary
Many input components use validation messages to inform user of formatting or validation rules that have not been met. For example, if a text-field's `min` value has not been met, then a default worded error message is displayed.

We should update our validation approach to allow these different error types, and their default messages, to be caught and customized so the implementer can add more detail to the message if required.

## 💬 Description
Enable all default error messages to be customized by implementer.

For example, when `max` value is exceeded the default error message "Maximum value of 4 is exceeded" is shown. This should be able to be overridden to something else, for example "You can only order a maximum of 4 coffees. Please update your order."

## 💰 Use value
This customization allows more specificity to be included in the copy and can make it easier to understand the changes the user needs to make in order to successfully complete the input.

## Additional info
Tell us anything else useful to help us understand your suggestion.

Contributor guide

Open the contributing guide

Research direction

Start by locating the validation logic and default messages across the input components. Review how each error type is produced and determine the customization interface; the work is done when implementers can override every default validation message, including the max-value example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.