(impact: low) Form input components should get its validation error messages from BaseFormControl.translatedErrors() #450
Description
Prerequisites
[Check these off before submitting an issue].
- Are you running the latest version? OR Are you submitting a bug for a prior version?
- Did you perform a basic issue search?
For more information, see the CONTRIBUTING
guide.
Description
FormInputComponent, NumberWithUnitFormInputComponent and FormCheckboxComponent all have their own logic to translate validation error messages. Once PR (#449) is merged these components should be refactored so that they all get their translated error messages from BaseFormControl.translatedErrors()
. The reasoning here is that all form input components should behave the same way when taking in the translation params to be use in its translation message.
Impact
Form input components are inconsistent in how it translate validation error messages.
Expected behavior: All form input components should have the same way to translate validate error messages.
Actual behavior: Each form input component has their own behavior on how it translate its validation error messages. Some uses the control's min and the max values (FormInputComponent, NumberWithUnitFormInputComponent ) and other just the component's value (FormCheckboxComponent).
Versions
- Package version (run
npm version
): 6.14.16 - Node Version (run
node -v
): v14.19.1 - OS Version: MacOS 12.6
- Browser Version: Chrome 105.0.5195.125