"Required" only checks for null-ness, which is a bit misleading with browsers, since empty text fields are sent as empty strings.
In addition, an action property that's a primitive "int" will be initialized to 0 (Java thing) whereas an Integer's default value is null. You may want to try (a) using an Integer property, and (b) using both the "required" and "int" validators. Dave --- On Tue, 11/25/08, David C. Hicks <[EMAIL PROTECTED]> wrote: > From: David C. Hicks <[EMAIL PROTECTED]> > Subject: Re: Couple of validation questions. > To: "Struts Users Mailing List" <user@struts.apache.org> > Date: Tuesday, November 25, 2008, 6:00 PM > Richa Pandharikar wrote: > > Can you please send the validation.xml file that you > are using? > > > here is the "add" validation. the > "update" is essentially identical, right now... > > <validators> > <field > name="playlistMediaBoardComponent.mediaBoard"> > <field-validator type="required"> > <message>You must select a > MediaBoard.</message> > </field-validator> > </field> > <field > name="playlistMediaBoardComponent.x"> > <field-validator type="required"> > <message>You must enter an X coordinate > for this MediaBoard Component.</message> > </field-validator> > </field> > <field > name="playlistMediaBoardComponent.y"> > <field-validator type="required"> > <message>You must enter an Y coordinate > for this MediaBoard Component.</message> > </field-validator> > </field> > </validators> > > > > --------------------------------------------------------------------- > 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]