package gov.nih.nci.cabig.caaers.web.fields.validators;

import org.apache.commons.validator.GenericValidator;

public class ZipCodeValidator extends FieldValidator {

    @Override
    public boolean isValid(Object fieldValue) {
    	if(fieldValue == null) return true;
    	return fieldValue.toString().matches( "\\d{5}" );
    }

    @Override
    public String getMessagePrefix() {
        return "Missing";
    }

    public String getValidatorCSSClassName() {
        return "ZIPCODE";
    }
}
@@ -82,34 +82,24 @@
 ons.
-validator.GenericValidator
+lang.StringUtils
 ;%0D%0A%0D
@@ -247,16 +247,62 @@
  == null
+ %7C%7C StringUtils.isEmpty(fieldValue.toString())
 ) return

fix for zip code validation issue.