webtier@glassfish.java.net

Validators of h:inputText not getting invoked value is ""

From: <webtier_at_javadesktop.org>
Date: Mon, 16 Feb 2009 12:04:35 PST

Hi,

I am using jsf api and impl 1.2._12.

I have the following facelet mark up:

<h:inputText id="testInput" value="#{testController.test}" required="false">
  <f:validator validatorId="stateValidator"/>
</h:inputText>

The "stateValidator" is configured as follows in faces-config

<validator>
  <validator-id>stateValidator</validator-id>
  <validator-class>adc.validators.MultiFieldLengthValidator</validator-class>
</validator>

The validator is getting invoked with no issues when the value of the field is anything other than "". But when the value is "", the validator does not get invoked.

I am wondering if I am doing something wrong. Please advise on potential solutions.

TIA,
Babu
[Message sent by forum member 'babus_18' (babus_18)]

http://forums.java.net/jive/thread.jspa?messageID=332110