title: Struts form long field not coming as null , when left blank in UI
body: <p>In struts-config.xml</p>
  
  <pre><code>&lt;form-bean name="myForm" type="com.validator.CustomeDynaValidatorForm"&gt;
        &lt;form-property name="testId" type="java.lang.Long"/&gt;
  &lt;/form-bean&gt;
  </code></pre>
  
  <p>In validation.xml</p>
  
  <pre><code>&lt;form name="myForm"&gt;
        &lt;field property="testId" depends="required"&gt;
          &lt;msg name="required" key="test ID required."/&gt;
        &lt;/field&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>In validation-rules.xml</p>
  
  <pre><code>&lt;validator name="required"
              classname="com.validator.CustomFieldChecks"
                 method="validateRequired"
                 methodParams="java.lang.Object,
                         org.apache.commons.validator.ValidatorAction,
                         org.apache.commons.validator.Field,
                         org.apache.struts.action.ActionMessages,
                         org.apache.commons.validator.Validator,
                         javax.servlet.http.HttpServletRequest"
                    msg=""/&gt;
  </code></pre>
  
  <p>In CustomFieldChecks.java</p>
  
  <pre><code>public static boolean validateRequired(Object bean, ValidatorAction va, Field field, ActionMessages errors, 
                                             Validator validator, HttpServletRequest request)
      {
          String value = null;
  
          if (isString(bean))
          {
              value = (String) bean;
          }
          else
          {
              value = ValidatorUtils.getValueAsString(bean, 
                                                      field.getProperty());
              **// here value is 0 , when the field is left blank in UI** 
          }
  
          if (GenericValidator.isBlankOrNull(value))
          {
              //add error message
  
              return false;
          }
          else
          {
              return true;
          }
      }
  </code></pre>
  
  <p>Can someone plz let me know , how do i make sure that if the field is left blank in UI , the value should be null not 0 . Is there a way to do so??? I am using struts 1.2</p>