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

IgxInput does not remove validation error style after the form is reset #5497

Closed
ymita opened this issue Jul 24, 2019 · 4 comments · Fixed by #5736

Comments

@ymita
Copy link

commented Jul 24, 2019

Description

IgxInput does not remove its validation error style after the form is reset.

  • igniteui-angular version: 8.1.0
  • browser: any

Steps to reproduce

  1. Run the attached sample
  2. Set focus on Name field
  3. Set focus on Price field
  4. Click "reset state" button
    IgxInput_Validation

Result

Form state is reset but the Name field and Price field keep invalid style.

Expected result

Name field and Price field does not have invalid style.

Attachments

igx-input-group.zip

@GeanAlexandre

This comment has been minimized.

Copy link

commented Aug 22, 2019

any update for this issue ?

@PixelShoot

This comment has been minimized.

Copy link

commented Aug 22, 2019

+1

@Lipata

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

@GeanAlexandre, @PixelShoot we are starting to work on this. Regards!

@wnvko wnvko self-assigned this Sep 2, 2019

wnvko added a commit that referenced this issue Sep 4, 2019
@wnvko wnvko referenced this issue Sep 4, 2019
3 of 14 tasks complete
wnvko added a commit that referenced this issue Sep 4, 2019
wnvko added a commit that referenced this issue Sep 4, 2019
@wnvko wnvko referenced this issue Sep 4, 2019
3 of 14 tasks complete
wnvko added a commit that referenced this issue Sep 4, 2019
@wnvko wnvko referenced this issue Sep 4, 2019
3 of 14 tasks complete
@wnvko

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

This issue should be fixed in next version. One note. If developer changes the value of any input by calling setValue or patchValue the input may or may not show validation errors. Here is how input should work by specification:

  • if input is pristine and untouched it will never show validation errors whatever value developer sets through code behind.
  • if input is touched or dirty:
    • if developer sets correct value through code behind form will not show validation errors.
    • if develper sets incorrect value through code behind form will show validation errors.

If developer needs to set invalid value, e.g. null or undefinde on touched or dirty form, and need to hide validation errors, he should call reset to make input pristine and untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.