Hi dave here is all the data you ask I have a jsp where i register a customer, diferent kind of customer, personalcustomer, enterprisecustomer depending on the type of customer in the action variable "customer" the file i use to validate.. I have several validation files Personal-validation.xml, Enterprise-validation.xml
Any suggestions ?? Regards, juan Fields in jsp <s:textfield label="%{getText('customer.registration.bussines.addressNumber')}" name="firstName"/> <s:textfield label="%{getText('customer.registration.bussines.addressApartment')}" name="lastName"/> --------------------------------------------------- Action class public class CustomerRegistration extends BaseAction implements ModelDriven { private static final long serialVersionUID = 1L; private static Logger logger = Logger.getLogger(CustomerRegistration.class); Customer customer = null; public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; } --------------------------------------------------- Validation file one CustomerRegistration-customerRegistration-validation.xml <validators> <field name="customer"> <field-validator type="visitor"> <message></message> </field-validator> </field> </validators> Validation file two Personal-validation.xml <validators> <field name="firstName"> <field-validator type="requiredstring"> <message key="customer.registration.personal.validation.firstName"/> </field-validator> </field> <field name="lastName"> <field-validator type="requiredstring"> <message key="customer.registration.personal.validation.lastName"/> </field-validator> </field> </validators> -----Mensaje original----- De: Dave Newton [mailto:[EMAIL PROTECTED] Enviado el: miƩrcoles, 28 de marzo de 2007 13:00 Para: Struts Users Mailing List Asunto: Re: Validation, ModelDriven and Field Errors --- Juan Espinosa <[EMAIL PROTECTED]> wrote: > Then i change the action to an action that implements ModelDriven, > when i do this changes the errors next to the controls doesnt appear > any more. I > must add in the jsp page the tag <s:fielderror/> to > get the errros. > > Anyone knows why the errors doesnt appear ?????????? How are you naming your form fields, both on the JSP and in the validation? Are you still using the modelClass.fieldName or just fieldName, and are they the same in both the JSP form fields and validation file? d. ____________________________________________________________________________ ________ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.20/736 - Release Date: 27/03/2007 16:38 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.20/736 - Release Date: 27/03/2007 16:38 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]