Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Decimal value with number field failing for specific value

Avatar

Level 2

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!!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@volgadr10 

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.

View solution in original post

0 Replies

Avatar

Level 2
Hi @Asutosh_Jena_, with using any I don't have control over any decimal places which is basically my requirement.

Avatar

Community Advisor

@volgadr10 
That's an issue with the coral 3 number field. So you might need to go with granite number field for now to resolve the issue.

granite/ui/components/foundation/form/numberfield

 

Thanks!

Avatar

Correct answer by
Community Advisor

@volgadr10 

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.

Avatar

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