Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nikola-klippa opened this issue Nov 6, 2023 · 0 comments

Comments

@nikola-klippa
Copy link

<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';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant