Decimal value with number field failing for specific value | Community
Skip to main content
Level 2
Mar 24, 2021 3:18 AM UTC
Solved

Decimal value with number field failing for specific value

Hi Team,

 

In my cq:dialog I have a field with following details:

<answerScore jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
fieldDescription="Select Score value for this Answer."
fieldLabel="Answer Score" name="./answerScore"
required="{Boolean}true"
min="{Double}-1"
max="{Double}10"
step="{Double}0.0001"/>

 It works fine for most of the values but fails for value 2.05. Is there anything I am doing wrong?

Thanks in advance!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Anudeep_Garnepudi
Anudeep_GarnepudiAccepted solution
New Participant
Mar 24, 2021 5:09 AM UTC

@volga_dharam_rakshika 

Even I see issue using granite/ui/components/coral/foundation/form/numberfield, working as expected using  granite/ui/components/foundation/form/numberfield. Give a try.

9 replies

Anudeep_Garnepudi
Anudeep_GarnepudiAccepted solution
New Participant
Mar 24, 2021 5:09 AM UTC

@volga_dharam_rakshika 

Even I see issue using granite/ui/components/coral/foundation/form/numberfield, working as expected using  granite/ui/components/foundation/form/numberfield. Give a try.

Translate
Level 2
Mar 24, 2021 5:28 AM UTC
@anudeep_garnepudi this works but the error message is quite difficult to read in case of error, any help on that?
Translate
Asutosh_Jena_
New Participant
Mar 24, 2021 4:49 AM UTC
Level 2
Mar 24, 2021 5:12 AM UTC
Hi @asutosh_jena_, with using any I don't have control over any decimal places which is basically my requirement.
Translate
Rohit_Utreja
New Participant
Mar 24, 2021 4:36 AM UTC
Level 2
Mar 24, 2021 4:57 AM UTC
i have tried with this and same issue for 2.05 value
Translate
Pawan-Gupta
Level 8
Mar 24, 2021 4:13 AM UTC
Level 2
Mar 24, 2021 4:20 AM UTC
Hi @pawan-gupta , I have tried with String type as well. Same issue exists.
Translate