validation with double value in Spring
<p>I want to check score which have value: 0.00 &lt;= value&lt;= 10.00<br/>
I used:<br/>
 -Model(Score):</p>

<pre><code> @Range(min = (long) 0.0, max = (long) 10.0)
 private double score;
</code></pre>

<p>-messages.properties:</p>

<pre><code>Range.score.score=Please input 0&lt;= score &lt;=10
</code></pre>

<p>-servlet-context.xml:</p>

<pre><code>   &lt;beans:bean id="messageSource"
        class="org.springframework.context.support.ResourceBundleMessageSource"&gt;
        &lt;beans:property name="basename" value="messages" /&gt;
    &lt;/beans:bean&gt;
</code></pre>

<p>But the value = 10.01 has passed the check.<br/>
Please help me.</p>