struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nandyiyer <nandussi...@gmail.com>
Subject Re: Struts2 XML based validation doesnt work !
Date Tue, 27 Apr 2010 05:40:12 GMT

When I dont provide any values to the input fields , I cannot perform the
operation and when I provide , it happens . 
So I'm sure that validation is working . 

Thanks 
Nanditha 


nandyiyer wrote:
> 
> Hello all ,
> 
> I'm trying to include XML based validation in my application ?
> 
> This is part of my struts.xml -
>                 <action name="addAuctionItem" class="auctionItemAction"
> method="addAuctionItem">
>                         <result name="success">
>                                 /body_displayAddAuctionItem.jsp
>                         </result>
>                         <result name="input">
>                                 /body_displayAddAuctionItem.jsp
>                         </result>
>                 </action>
> 
> and this is my AuctionItemAction-addAuctionItem-validation.xml -
> 
> <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator
> 1.0.2//EN"
>        "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
> <validators>
>         <field name="auctionItem.shortDescription">
>                 <field-validator type="requiredstring">
>                         <message>Item name is required.</message>
>                 </field-validator>
>         </field>
>         <field name="auctionItem.longDescription">
>                 <field-validator type="requiredstring">
>                         <message>Description is required.</message>
>                 </field-validator>
>         </field>
> </validators>
> 
> When I try to run the application the validation doesnt happen at all .
> The class and xml file are in the same package structure .
> 
> Do anyone have an idea about this ?
> Any help on this will be greatly appreciated .
> 
> Thanks
> Nanditha 
> 
> 

-- 
View this message in context: http://old.nabble.com/Struts2-XML-based-validation-doesnt-work-%21-tp28265349p28373110.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message