You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I used the playground https://rjsf-team.github.io/react-jsonschema-form/ to create a number field, but it failed with validation for some values like '2000000.13', error message says 'Must be a multiple of 0.01'
JSONSchema { "type": "object", "title": "Number fields & widgets", "properties": { "number": { "title": "Number", "type": "number", "multipleOf": 0.01 } } }
UISchema {}
Some other values failed the validation as well, for example
39999999.12
1234599.12
Thanks in advance.
Expected Behavior
The field should accept number like '2000000.13'
Steps To Reproduce
No response
Environment
- OS:
- Node:
- npm:
Anything else?
No response
The text was updated successfully, but these errors were encountered:
@Alicezhang821 Given the comment above, it seems to be an AJV bug. If you are experiencing this in your application, you can set the precision for the validator-ajv6 or validator-ajv8 using the ajvoptionsoverrides capability for your validator. If it's only a playground issue, then we'd like close it. Thanks!
Prerequisites
What theme are you using?
Version
5.x
Current Behavior
Hello,
I used the playground https://rjsf-team.github.io/react-jsonschema-form/ to create a number field, but it failed with validation for some values like '2000000.13', error message says 'Must be a multiple of 0.01'
JSONSchema
{ "type": "object", "title": "Number fields & widgets", "properties": { "number": { "title": "Number", "type": "number", "multipleOf": 0.01 } } }
UISchema
{}
Some other values failed the validation as well, for example
39999999.12
1234599.12
Thanks in advance.
Expected Behavior
The field should accept number like '2000000.13'
Steps To Reproduce
No response
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: