Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

(impact: low) Form input components should get its validation error messages from BaseFormControl.translatedErrors() #450

Open
@xqvu

Description

@xqvu

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

  1. Package version (run npm version): 6.14.16
  2. Node Version (run node -v): v14.19.1
  3. OS Version: MacOS 12.6
  4. Browser Version: Chrome 105.0.5195.125

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions