myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Obster <>
Subject t:inputText and validation on empty value
Date Wed, 13 Jun 2007 09:01:04 GMT

can somebody tell me how I get a validation on an empty value running?
I use a
<t:inputText value="#{}" validator="#{order.validateDate}">
   <f:convertDateTime type="date" pattern="dd.MM.yyyy"/>

I have seen, that when no value is entered, the validator is not 
executed. But this is not the expected behaviour. So how can I run this 
validator also on a empty value? Do I need to write an own converter for 
that, where I return not a null but a empty String?

I have also tried a required="true" tag, but the I only see in the 
h:messages a validation error but no info that it comes from the empty 
date. Is there a way to change the generated message?


View raw message