struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: expression validator
Date Fri, 29 Feb 2008 14:53:31 GMT
declare the field validator such as the field-name declared in validators in
  <field name="requiredStringValidatorField">
    <field-validator type="requiredstring">
      <param name="trim">true</param>
            <message key=""><![CDATA[ required and must be
string ]]></message>

in the jsp setup a textfield which uses the preconfigured
requiredStringValidatorField as described in this example from
           <s:textfield label="Required String Validator Field"
name="requiredStringValidatorField" />

place the returned field error string into s:fielderror with param specified
as the name of the validator item described here
        <h3>Field Error due to 'Required String Validator Field' Will Appear
            <s:param value="%{'requiredStringValidatorField'}" />

Make sense?

From: "Dave Newton" <>
To: "Struts Users Mailing List" <>
Sent: Friday, February 29, 2008 9:16 AM
Subject: RE: expression validator

> --- Deepak Kumar <> wrote:
> > Here is very good example with running source code.
> >
> Hmm, that doesn't seem to do client-side expression validation either,
> I missed it. Perhaps you can point it out.
> Dave
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message