/** * For a fixed length, use min = max values. * <p> * Bounds could be any object having toString representating an integer. * </p> * * @param min Minimum length for the validated String, use a null value to get unbounded length. * @param max Maximum length for the validated String, use a null value to get unbounded length. */ public LengthConstraint(Object min, Object max) { this.min = ConstraintUtils.objectToPostiveLong(min); this.max = ConstraintUtils.objectToPostiveLong(max); }