Hi Friends, 
        I am using struts 2.1.6. Facing problem with error messages. 
 When i use 'regex' validator in validation.xml file than 
 1. when i clicked on submit button for the first time. 
       It is showing error messages like 
                 Customer name is required. 
                 Allow alphabets only. 
 the above message 'Allow alphabets only must show when some invalid data
enter in the field other than alphabets. 

2. with out entering data again i clicked submit button. 
than know error messages are 
  Customer name is required. 
  Allow alphabets only. 
  Customer name is required. 
  Allow alphabets only.       Repated twice. 

if i clicked again thrice......... 

And my code in xml file is, and using default theme 


<field name="customer.name">     
    <field-validator type="requiredstring" short-circuit="true"> 
      true
      <message key="error.cusname.req"></message> 
    </field-validator> 
    <field-validator type="regex" > 
            <![CDATA[(^[a-zA-Z ]+$)]]>
        <message key="error.cusname.fv"></message> 
    </field-validator> 
   </field> 

 if i remove regex than it is working fine. 

Could u tell me how to reolve this issue. 

Srikanth Goud 
-- 
View this message in context: 
http://old.nabble.com/problem-with-regex-validator-tp26608364p26608364.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to