Decimal value with number field failing for specific value | Community
Skip to main content
Level 2
March 24, 2021
Solved

Decimal value with number field failing for specific value

  • March 24, 2021
  • 4 replies
  • 2097 views

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.
Best answer by Anudeep_Garnepudi

@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.

4 replies

Pawan-Gupta
Level 8
March 24, 2021
Level 2
March 24, 2021
Hi @pawan-gupta , I have tried with String type as well. Same issue exists.
Rohit_Utreja
Community Advisor
Community Advisor
March 24, 2021
Level 2
March 24, 2021
i have tried with this and same issue for 2.05 value
Asutosh_Jena_
Community Advisor
Community Advisor
March 24, 2021
Level 2
March 24, 2021
Hi @asutosh_jena_, with using any I don't have control over any decimal places which is basically my requirement.
Anudeep_Garnepudi
Community Advisor
Anudeep_GarnepudiCommunity AdvisorAccepted solution
Community Advisor
March 24, 2021

@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.

Level 2
March 24, 2021
@anudeep_garnepudi this works but the error message is quite difficult to read in case of error, any help on that?