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

Please confirm the right way to clear RXwebvalidator and reset it #641

Open
CryptocurrencyZ opened this issue Aug 1, 2023 · 0 comments
Open

Comments

@CryptocurrencyZ
Copy link

Describe the problem statement?

Please confirm the right way to clear validators and reset it again.

After I have done this,

this.test.controls['testAmount'].setValidators(null);

When i reset it like this,

    this.test.controls['TestAmount'].setValidators([
      RxwebValidators.required(),
      RxwebValidators.numeric({ allowDecimal: true, isFormat: true }),
      RxwebValidators.minNumber({ value: Number(this.amount), message: `This field cannot be less than ${this.amount}`}),
    ]);

It only updates my validation if the input is change by the user??

The expected solution you would like

Url

Package version

@rxweb/

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