Hey everyone,
I'm working on a custom validator right now, and all the validation method
does is return false.  That means it fails that validation, right?
Anyway, when I submit the form, I get a NoSuchMethod error.  What would
cause this?  All of my regular validations work, just not this custom one.
Here are some code snippets.  Thanks in advance for any help!

public class CustomValidator implements Serializable 
{
        public static boolean validateRange(Object bean, ValidatorAction va,

                                        Field field, ActionErrors errors,
HttpServletRequest request)
        {
                return false;
        }
}


validator-rules.xml:

          <!-- Custom Validators -->
      
      <validator name="validRange"
            classname="com.moog.us.app.ans.validation.CustomValidator"
               method="validateRange"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionErrors,
                       javax.servlet.http.HttpServletRequest,
                       javax.servlet.ServletContext"
                  msg="errors.invalid.range">
      </validator>


And parts of my validation.xml:

    <global>

    </global>

                <form name="/AddAssignment">
                        <field  property="startRange"
                                        depends="required">
                                        <arg0 key="app.label.startRange"/>
                        </field>
                        <field  property="endRange"
                                        depends="validRange">
                        </field>
                </form>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to