The validation is working fine. Thank u so much. I did a little mistake and
i found it.

*Thanks and Regards,*
Muralidhar Yaragalla.
*
*


On Thu, Sep 19, 2013 at 11:56 PM, Yaragalla Muralidhar <
yaragallamur...@gmail.com> wrote:

> My StudentRegistrationAction-validation.xml is as below:-
>
> <!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "
> http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd";>
> <validators>
>     <field name="primDet.admissionNo">
>      <field-validator type="regex">
>           <param name="regex"><![CDATA[[0-9]{3,}]]></param>
>  <!--     <message>The value of bar2 must be in the format
> <![CDATA[[0-9]{3,}]> where x and y are between 0 and 9</message> -->
>        <message key="error.admission.no">Could not find error.admission.no
> !</message>
>      </field-validator>
>     </field>
>     <field name="primDet.admissionDate">
>      <field-validator type="regex">
>           <param name="regex"><![CDATA[\d{2}/\d{2}/\d{4}]]></param>
>        <message key="error.admission.date">Could not find
> error.admission.date</message>
>      </field-validator>
>     </field>
> </validators>
>
>
>
> My jsp code is as below:-
>
> <form id="form" method="post" action="primaryDetails.action">
> <input type="text" class="text" size="15" name="primDet.admissionNo" />
> <input type="text" class="text" style="color:#DDD4E7" value="dd/mm/yyyy"
> onclick="displayCalendar(event,this)" size="15"
> name="primDet.admissionDate"/>
> </form>
>
> My student-reg.xml is as below:-
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>  "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> "http://struts.apache.org/dtds/struts-2.3.dtd";>
>
> <struts>
>
>     <constant name="struts.enable.DynamicMethodInvocation" value="false" />
>     <constant name="struts.devMode" value="true" />
>
>
>
>     <package name="sr" namespace="/" extends="struts-default">
>
>      <interceptors>
>      <interceptor name="umsInter"
> class="com.ymd.ums.interceptor.UMSInterceptor"/>
>         <interceptor-stack name="appDefault">
>           <interceptor-ref name="defaultStack" />
>      <!-- <interceptor-ref name="umsInter" />  -->
>         </interceptor-stack>
>     </interceptors>
>
>     <default-interceptor-ref name="appDefault" />
>
>         <global-results>
>             <result name="error">/error.jsp</result>
>         </global-results>
>
>         <global-exception-mappings>
>             <exception-mapping exception="java.lang.Exception"
> result="error"/>
>         </global-exception-mappings>
>
>         <action name="primaryDetails"
> class="com.ymd.ums.sm.sr.action.StudentRegistrationAction" method="execute">
>     <result
> name="success">/jsp/StudentManage/sr_personalDetails.jsp</result>
>     <result name="input"
> >/jsp/StudentManage/sr_personalDetails.jsp</result>
>   </action>
>     </package>
>
>     <include file="mailreader-default.xml"/>
>
> </struts>
>
>
>
> This is the configaration i have. the validation is not working. please
> help?
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
> *
> *
>
>
> On Thu, Sep 19, 2013 at 11:46 PM, Dave Newton <davelnew...@gmail.com>wrote:
>
>> Not enough information to help, obviously.
>>
>> Dave
>>
>>
>>
>> On Thu, Sep 19, 2013 at 2:06 PM, Yaragalla Muralidhar <
>> yaragallamur...@gmail.com> wrote:
>>
>> > I am not using struts tags.
>> >
>> > *Thanks and Regards,*
>> > Muralidhar Yaragalla.
>> > *
>> > *
>> >
>> >
>> > On Thu, Sep 19, 2013 at 11:32 PM, Yaragalla Muralidhar <
>> > yaragallamur...@gmail.com> wrote:
>> >
>> > > Hi I am using struts2. I have craeted xx-validation.xml in the same
>> dir
>> > of
>> > > action class xx.java. I am not sure why this is happening? kindly
>> help?
>> > >
>> > > *Thanks and Regards,*
>> > > Muralidhar Yaragalla.
>> > > *
>> > > *
>> > >
>> >
>>
>>
>>
>> --
>> e: davelnew...@gmail.com
>> m: 908-380-8699
>> s: davelnewton_skype
>> t: @dave_newton <https://twitter.com/dave_newton>
>> b: Bucky Bits <http://buckybits.blogspot.com/>
>> g: davelnewton <https://github.com/davelnewton>
>> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
>>
>
>

Reply via email to