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

DynamicTextAreaModel with 'minLength': 0 in "validators" still requires at least one character gets entered :: stackblitz link provided #925

Closed
fbayanati opened this issue Feb 5, 2019 · 2 comments

Comments

@fbayanati
Copy link

I'm submitting a


[X] Bug / Regression
[ ] Feature Request / Proposal
[ ] Question

I'm using


NG Dynamic Forms Version: `7.1.0`

[ ] Basic UI
[ ] Bootstrap UI  
[ ] Foundation UI
[ ] Ionic UI
[ ] Kendo UI
[X] Material  
[ ] NG Bootstrap
[ ] Prime NG

Description

DynamicTextAreaModel with 'minLength': 0 in "validators" still requires at least one character gets entered, please look into the stackblitz.

const myTextArea = new DynamicTextAreaModel({ id: "myTextArea", label: "My Textarea", validators: { "required": null, "minLength": 0 } });

It behaves like when you have the 'minLength': 1 for the DynamicTextAreaModel validators property.
To fix I totally dropped validators, but would be good if we could keep it and set it to 0 the min length validation was not necessary.

Please advise.

@Karamuto
Copy link
Collaborator

Hello @fbayanati ,

when you have minlength at 0 why even use the validator in the first place?

Seems like a similiar issue to this angular issue here: angular/angular#23749

I think its a problem with the angular validator itself instead of dynamic forms

@udos86
Copy link
Owner

udos86 commented Apr 16, 2019

@Karamuto

Thank you for helping out here! I also could not evaluate a legitimate bug here.

@udos86 udos86 closed this as completed Apr 16, 2019
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

3 participants