Re: validators strange behavior

2013-09-20 Thread Yaragalla Muralidhar
This problem is also solved. Thanks.

*Thanks and Regards,*
Muralidhar Yaragalla.
*
*


On Fri, Sep 20, 2013 at 1:45 AM, Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 I have written validators for 3 fields but only validation is happening
 for one field. Out of 3 fields the validation is happening only for
 primDet.admissionDate field. even though the the text fields are empty
 for the other 2, the validation is not happening.

 The following is the xx-validation.xml file:-

 !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[\d{3,}]]/param
message key=error.admission.noCould 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.dateCould not find
 error.admission.date/message
  /field-validator
 /field

 field name=primDet.applicationNo
  field-validator type=regex
   param name=regex![CDATA[\d{3}]]/param
message key=error.admission.dateCould not find
 error.admission.date/message
  /field-validator
 /field
 /validators

 My jsp 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/
 onclick=displayCalendar(event,this) size=15
 name=primDet.admissionDate/
 input type=text class=text size=15 name=primDet.applicationNo/
 /form

 what is the problem? why this is happening? kindly help?

 *Thanks and Regards,*
 Muralidhar Yaragalla.
 *
 *



validators strange behavior

2013-09-19 Thread Yaragalla Muralidhar
I have written validators for 3 fields but only validation is happening for
one field. Out of 3 fields the validation is happening only for
primDet.admissionDate field. even though the the text fields are empty
for the other 2, the validation is not happening.

The following is the xx-validation.xml file:-

!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[\d{3,}]]/param
   message key=error.admission.noCould 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.dateCould not find
error.admission.date/message
 /field-validator
/field

field name=primDet.applicationNo
 field-validator type=regex
  param name=regex![CDATA[\d{3}]]/param
   message key=error.admission.dateCould not find
error.admission.date/message
 /field-validator
/field
/validators

My jsp 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/
onclick=displayCalendar(event,this) size=15
name=primDet.admissionDate/
input type=text class=text size=15 name=primDet.applicationNo/
/form

what is the problem? why this is happening? kindly help?

*Thanks and Regards,*
Muralidhar Yaragalla.
*
*