class ConceptDatatypeValidator implements Validator {

	@Override
	public void validate(Object obj, Errors errors) {
		ConceptDatatype cd = (ConceptDatatype) obj;
		if (cd == null) {
			errors.rejectValue("conceptDatatype", "error.general");
		} else {
			ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "error.name");
			ValidateUtil.validateFieldLengths(errors, obj.getClass(), "name", "hl7Abbreviation", "description",
			    "retireReason");
		}
	}

}