You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chetan Pandey <cp...@BLUEsingapore.com> on 2006/08/22 09:33:56 UTC

Custom Validation Doesnt Work

Hi All:

 

I have the following Code in my Custom Validation class:

 

  if (propertyVO != null)

            {

                System.out.println("propertyVO != null.Hence Errors. Will
return false");

                errors.add(field.getKey(),
Resources.getActionMessage(request, action, field));

                return false;

            }

 

Where the method is as follows:

 

public static boolean validateHolidexCode(Object bean, ValidatorAction
action, Field field, ActionErrors errors, HttpServletRequest request)

    

The System.out.println( "("propertyVO != null..." is getting printed but it
is not stopping the Form from going to the Action , neither is the Error
Message being shown.

 

Other non-Custom Validation mesaages get printed properly.

 

Thanks.

 

Chetan