Skip to content

Reactive Forms make input invalid when form Control is invalid #9667

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

Closed
ricardosaracino opened this issue Jun 4, 2021 · 1 comment
Closed

Comments

@ricardosaracino
Copy link

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Reactive Forms IgxDatePickerComponent and others:

When the form control is required and dirty&touched the validation should highlight the element in Red

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

this works [class.igx-input-group--invalid]="filterFormGroup.touched && filterFormGroup.get('endDate').errors"

Additional context

Add any other context or screenshots about the feature request here.

@jackofdiamond5
Copy link
Member

Hi @ricardosaracino, can you specify the version of igniteui-angular that you're currently using? After 11.2 there shouldn't be any issues with updating the validity of the input. You can look at the Reactive Forms Demo just to verify.

Additionally, if you're trying to manually update the touched or dirty properties through API methods, this will currently not reflect on the styling of the input. The workaround for this is to call updateValueAndValidity after you've updated the properties. More on this can be found here - #6434.

@Lipata Lipata closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants