Hi,

yes works ;-). But I think it will be difficult to give this to normal user. You know the OSI Layer 8 ;-).

Tried my own converter where I return a new Date() instead of null on empty value, which is the default when you use convertDateTime. Then the validator is running where I can set an own message ;-). Because of an own error before, it has not worked and therefor the question :-/.

Cheers,
Michael

Cagatay Civici schrieb:
Hi,

Try setting showDetail to true on h:messages

Cagatay

On 6/13/07, *Michael Obster* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi,

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

    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?

    Cheers,
    Michael



Reply via email to