Altinn / Altinn/app-frontend-react

Schema JSON validation error for multipleOf

Open
#3,811 4 comments 0 reactions 1 assignee Claimed by @ivarne View on GitHub
kind/bug squad/data
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description of the bug

Validation error for a field which is capable of taking inn 2 decimal numbers gets a validation error for certain numbers like 4.1, 4.6 , 5.1 , 9.2. As these numbers are multiple of 0.01 they should not give this validation error
**Schema component:**
`"DesimaltallNiTo": {
"@xsdType": "decimal",
"type": "number",
"@xsdStructure": "XmlSchemaSimpleTypeRestriction",
"totalDigits": 9,
"multipleOf": 0.01
},`
**Frontend component:**
`{
"id": "U-13-Input-AntallAarsverk",
"type": "Input",
"textResourceBindings": {
"title": "U-13-Input-AntallAarsverk.title"
},
"dataModelBindings": {
"simpleBinding": "Skjemainnhold-RR0002U.noter.noteAarsverkTjenestePensjon.antallAarsverk.value"
},
"formatting": {
"number": {
"decimalScale": 2,
"thousandSeparator": " ",
"decimalSeparator": ["text", "desimaltegn"]
}
},
"grid": {
"xs": 6,
"innerGrid": {
"xs": "auto"
}
},
"showValidations": ["AllExceptRequired"]
},`

### Steps To Reproduce

Repo where the Issue occurs:
[Årsrengskap RR0002](https://altinn.studio/repos/brg/aarsregnskap-vanlig-202406 )
The issue occurs on this side, under Regnskapsskjema -> Selskapsregnskap.
Image

### Additional Information

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.