Class ValidationErrorMessageBuilder

Builder to create validation error message map.

Methods

  • Validators that coexists on same element can have a combined message, i.e. if a element have the required and the personnummer validator the required error message could be combined with mapCombined('required','personnummer', 'You must enter a social security number!');.

    Parameters

    • validatorName: string

      the name of the validator

    • dependentValidatorName: string

      the name of the combined validator

    • message: string

      the error message

    • OptionalelementType: "select" | "textarea" | "text" | "radio" | "checkbox"

      limit to a specific element type

    Returns this