Validate the given object against the constraint. Checks to make sure the string
is not null if not allowed. If a non-null string is passed then the string is
validated to make sure it isn't too long.
param
obj The object to validate.
throws
ConstraintException If the constraint is violated.
super.validate(obj);
if (obj != null) {
String tgtString = (String)obj;
if (tgtString.length() > maxLength) {
throw new ConstraintException(ConstraintExceptionType.STRING_TOO_LONG);
}
}