http://struts.apache.org/2.x/docs/email-validator.html
On Wed, May 28, 2008 at 9:17 AM, Anshu Dhamija <[EMAIL PROTECTED]> wrote: > I have already gone through this doc but I want know the field validator > type for email id field as it is shown as int for age in the doc > > Regards > Anshu > > -----Original Message----- > From: Matt Raible [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 28, 2008 7:04 PM > To: [email protected] > Subject: Re: [appfuse-user] validation problem > > This should help: > > http://struts.apache.org/2.x/docs/validation.html > > Matt > > On Wed, May 28, 2008 at 7:23 AM, Anshu Dhamija > <[EMAIL PROTECTED]> wrote: >> >> Thanx a lot >> Its my mistake I used required instead of requiredstring >> >> Is the validator type for email is email or some thing else? >> >> Regards >> Anshu >> >> -----Original Message----- >> From: Matt Raible [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, May 28, 2008 6:00 PM >> To: [email protected] >> Subject: Re: [appfuse-user] validation problem >> >> You may want to verify your UserUpdateAction-validation.xml is next to >> your UserUpdateAction.class in the final WAR. >> >> Matt >> >> On Wed, May 28, 2008 at 4:44 AM, Anshu Dhamija >> <[EMAIL PROTECTED]> wrote: >>> I have done the following steps >>> >>> added UserUpdateAction-validation.xml in src/main/resource/.webapp/action >>> >>> >>> >>> <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator >> 1.0//EN" >>> >>> "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd"> >>> >>> <validators> >>> >>> <field name="email"> >>> >>> <field-validator type="requiredstring"> >>> >>> <message>Email is a required field.</message> >>> >>> </field-validator> >>> >>> <field-validator type="email"> >>> >>> <message>Must provide a valid email</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> <field name="retypeEmail"> >>> >>> <field-validator type="required"> >>> >>> <message>Retype Email is a required field.</message> >>> >>> </field-validator> >>> >>> <field-validator type="email"> >>> >>> <message>Must provide a valid email</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> <field name="firstName"> >>> >>> <field-validator type="required"> >>> >>> <message>First Name is a required field.</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> <field name="lastName"> >>> >>> <field-validator type="required"> >>> >>> <message>Last Name is a required field.</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> <field name="currentPassord"> >>> >>> <field-validator type="required"> >>> >>> <message>Current Password is a required field.</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> <field name="newPassword"> >>> >>> <field-validator type="required"> >>> >>> <message>New Password is a required field.</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> <field name="reNewPassword"> >>> >>> <field-validator type="required"> >>> >>> <message>Retype New Password is a required field.</message> >>> >>> </field-validator> >>> >>> </field> >>> >>> >>> >>> </validators> >>> >>> >>> >>> given the text fields names same as specified in action class >>> >>> >>> >>> made an entry in struts.xml >>> >>> <action name="validateUser" class="userUpdateAction" method="update"> >>> >>> >>> >>> <result name="input">/edit_profile.jsp</result> >>> >>> <result >> name="success">/edit_profile_confirm.jsp</result> >>> >>> >>> >>> </action> >>> >>> >>> >>> All the above steps are mentioned in tutorials but it is not working >>> >>> If I click submit without filling any of the fields it shows mein error >>> message but if I fill on of the field the error message is still shown >> there >>> >>> Can anyone tell me where is my mistake >>> >>> Thanx in advance >>> >>> >>> >>> Regards >>> >>> Anshu >>> >>> ________________________________ >>> >>> From: Anshu Dhamija [mailto:[EMAIL PROTECTED] >>> Sent: Wednesday, May 28, 2008 2:16 PM >>> To: [email protected] >>> Subject: [appfuse-user] validation problem >>> >>> >>> >>> Can anybody tell me how to apply validation in my application? >>> >>> I have followed the tutorial but was not able to apply validation. >>> >>> >>> >>> >>> >>> Regards >>> >>> Anshu >>> >>> >> >> >> >> --------------------------------------------------------------------- >> 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] > > > > > --------------------------------------------------------------------- > 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]
