Skip to Content
Former Member
Apr 19, 2017 at 10:31 AM

Custom Validator not showing any error message on front end


Hi I have written custom validator which extends AddressValidator also I have created custom form which extends AddresForm . When i submit form it created errors in back end but some how it is not showing in front end .

     public boolean supports(final Class<?> aClass)
         return CustomAddressForm.class.equals(aClass);
     public void validate(final Object object, final Errors errors)
         final AddressForm addressForm = (AddressForm) object;
         super.validate(addressForm, errors);

And i called same from

addressValidator.validate(customAddressForm, bindingResult);.

Same is working if i pass addressForm object.