Skip to content

Casing for klp-form-element errors. minlength, maxlength and matchpassword for error messages have incorrect casing #37

Description

@nikola-klippa
<klp-form-error error="minLength">
    {{"The code must be 6 characters" | translate}}
</klp-form-error>

I tried doing this where I added the Validators.minLength in the typescript but it does not work. After looking through the enhancy forms code base I realized that the casing is incorrect in the klp-form-element component. The solution we came up with to this problem was to do the following:

<klp-form-error [error]="minLength">
    {{"The code must be 6 characters" | translate}}
</klp-form-error>

and having to add in order to get the klp-form-element to work as intended and include the message above. This solution is very bad to do in practice and should not be how it is supposed to be done.

protected readonly minLength = 'minlength' as 'minLength';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions