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

RxwebValidators.numeric with isFormat: true makes values disappear from input #632

Open
mmajrk opened this issue May 16, 2023 · 1 comment

Comments

@mmajrk
Copy link

mmajrk commented May 16, 2023

Describe the bug

When using a numeric validator with "isFormat" flag set to true, values larger or equal than 1000 disappear from input.

Expected Behavior

Value does not disappear

To Reproduce

  1. Add a validator with following config to an input of type "number"
RxwebValidators.numeric({
    acceptValue: NumericValueType.PositiveNumber,
    allowDecimal: true,
    isFormat: true,
    digitsInfo: '1.2-2',
})
  1. Enter a value equal or larger than 1000
  2. Value disappears

Url (stackblitz or plunker or other)

https://stackblitz.com/edit/angular-jr7hjm?file=src/main.ts

Package Version

@rxweb/reactive-form-validators@^13.0.0

@pranavirabatti
Copy link
Contributor

@malymato Why would anybody set isFormat to true on a number type? Yes, it would be good to handle the case where setting isFormat to true on a number type will not have any impact.
@ajayojha what is your opinion on this?

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

2 participants