JSF <f:validateDoubleRange> Tag

It is used to check that the value of a input field is within a certain range or not. The value must be floating-point or convertible to floating-point.

<f:validateDoubleRange> TagAttributes

Attribute Description
minimum It is used to set minimum value for this component.
maximum It is used to set maximum value for this component.

<f:validateDoubleRange> Tag Example


<h:outputLabel for="amount">Enter Amount </h:outputLabel>  
<h:inputText id="name-id" value="#{user.amount}" validatorMessage="Please enter amount between 1000.50 and 5000.99">  
<f:validateDoubleRange minimum="1000.50" maximum="5000.99"/>  
<h:commandButton value="Submit" action="response.xhtml"></h:commandButton>  

import javax.faces.bean.ManagedBean;  
import javax.faces.bean.RequestScoped;  
public class User{  
double amount;  
public double getAmount() {  
return amount;  
public void setAmount(double amount) {  
this.amount = amount;  


<f:view locale="fr">  
Amount entered by you: <h:outputText id = "user-name-id" value="#{user.amount}">  

© copyright 2017-2022 Completedone pvt ltd.