title: Alphanumeric Validation in struts2-validation.xml
body: <p>I am using text filed for product name. Type of this field is String.</p>
  
  <p>I want to validate the field with 0-9,a-z,A-Z and not allow special chrs and only numbers without alphabets.</p>
  
  <p>productName1234>> Valid input</p>
  
  <p>1234>> inValid input.</p>
  
  <p>My Code in Validation.xml is as follows.</p>
  
  <pre><code>&lt;validator type="requiredstring"&gt;
      &lt;param name="fieldname"&gt;productName&lt;/param&gt;
      &lt;message&gt;Please select product Name.&lt;/message&gt;
  &lt;/validator&gt;
  
  &lt;validator type="regex"&gt;
      &lt;param name="fieldname"&gt;productName&lt;/param&gt;
      &lt;param name="expression"&gt;^[,a-zA-Z0-9 ]*$&lt;/param&gt;
      &lt;message&gt;Product name should accept only in AlphaNumeric.&lt;/message&gt;
  &lt;/validator&gt;
  </code></pre>
  
  <p>Can anyone help me to solve this issue. What i have to use in validation.xml</p>