Hello,

I suppose StringValidator is used only with ValidField, because it implements IValidator interface. With text field you can use validators which implement Validator interface.

Audrius


----- Original Message ----- From: "Michal Hlavac" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Monday, September 19, 2005 2:28 PM
Subject: tapestry 4 validators


hello,

Why can't I use this code?

   <bean name="basicValidator"
class="org.apache.tapestry.valid.StringValidator">
       <set name="required" value="true"/>
       <set name="minimumLength" value="1"/>
   </bean>

   <component id="firstNameField" type="TextField">
       <binding name="value" value="ognl:firstName"/>
       <binding name="validators" value="bean:basicValidator"/>
   </component>

I know, that I can use value="validators:required,minLength=0", but I
don't understand why there is java.lang.ClassCastException on
org.apache.tapestry.form.ValidatableFieldSupportImpl.validate(ValidatableFieldSupportImpl.java:89)

thanks, miso

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to