Skip to content

forms: provide the the min/max value in validator error messages #1373

@michael-smt

Description

@michael-smt

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

Feature request

For the the min* and max* validators, the validator error messages from the SiFormValidationErrorMapper should include information about what the smallest or biggest accepted value is.

For example instead of The value is too small the message could be The value should be {{min}} or more.

Affected error messages and translation keys:

  • min / SI_FORM_CONTAINER.ERROR.MIN
  • max / SI_FORM_CONTAINER.ERROR.MAX
  • minlength / SI_FORM_CONTAINER.ERROR.MIN_LENGTH
  • maxlength / SI_FORM_CONTAINER.ERROR.MAX_LENGTH
  • minDate / SI_FORM_CONTAINER.ERROR.MIN_DATE
  • maxDate / SI_FORM_CONTAINER.ERROR.MAX_DATE
  • minTime / SI_FORM_CONTAINER.ERROR.MIN_TIME
  • maxTime / SI_FORM_CONTAINER.ERROR.MAX_TIME

Use case

The user sees what values are expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    uxMarks all UX related topics (UX team is working on or UX input is required)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions