Capgemini / dcx-react-library

React Library UI/UX agnostic
https://main--6069a6f47f4b9f002171f8e1.chromatic.com
MIT License
113 stars 6 forks source link

FormInput Error Position: display after the hint #405

Closed brightpixels closed 1 year ago

brightpixels commented 1 year ago

Is your feature request related to a problem? Please describe. We are following GDS rules in our project and the position of the FormInput Error messages for Inputs, according to GDS is after the hint.

This problem is only visible when there is a hint is present. At the moment, there is no way to force the error to display after the hint. We can only display the error before the label, after the label (which is after the hint if there is one present) and below the input.

Describe the solution you'd like I suggest a further option called ErrorPosition.AFTER_HINT (similar to ErrorPosition.AFTER_LABEL, ErrorPosition.BEFORE_HINT, ErrorPosition.AFTER_BOTTM)

Or modify ErrorPosition.AFTER_LABEL to print the error after the hint.

Describe alternatives you've considered None

daniele-zurico commented 1 year ago

closed by PR #410