You have to use validator-S- prefix when specifying multiple validators.
validators="validators:string,required"
On 20050825, at 161641, Denis Souza wrote:
I'm trying to perform input validation in Tapestry 4.
I have the following input field:
<input jwcid="[EMAIL PROTECTED]" size="15" maxlength="50"
displayName="message:class-name"
validators="validator:string,required"
value="ognl:productClass.name"/>
And when I submit the form I get this:
java.lang.ClassCastException:
org.apache.tapestry.valid.StringValidator
org.apache.tapestry.form.ValidatableFieldSupportImpl.validate
(ValidatableFie
ldSupportImpl.java:89)
$ValidatableFieldSupport_105ef3b5a9e.validate
($ValidatableFieldSupport_105ef
3b5a9e.java)
org.apache.tapestry.form.TextField.rewindFormComponent
(TextField.java:86)
org.apache.tapestry.form.AbstractFormComponent.renderComponent
(AbstractFormC
omponent.java:104)
...
A peek at the code and I find that StringValidator is an
"IValidator" type
and it's being typecast into a "Validator".
Am I using this in a wrong way or could this be a bug? I'm using
Tapestry4-beta4.
Thanks,
Denis Souza
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]