@Test public void long_enough() throws Exception { Field field = mockField(); MessageFormatter formatter = mockMessageFormatter(); String value = "Now the student has become the master."; replay(); MinLength validator = new MinLength(null); validator.validate(field, value.length(), formatter, value); verify(); }
public void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value) throws ValidationException { if (value.length() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); }
MinLength extends AbstractValidator<Integer, String> { public void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value) throws ValidationException { if (value.length() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } }
MinLength extends AbstractValidator<Integer, String> { public void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value) throws ValidationException { if (value.length() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } MinLength(JavaScriptSupport javaScriptSupport); }
MinLength extends AbstractValidator<Integer, String> { public void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value) throws ValidationException { if (value.length() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } MinLength(JavaScriptSupport javaScriptSupport); void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value); void render(Field field, Integer constraintValue, MessageFormatter formatter, MarkupWriter writer,
                       FormSupport formSupport); }
MinLength extends AbstractValidator<Integer, String> { public void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value) throws ValidationException { if (value.length() < constraintValue) throw new ValidationException(buildMessage(formatter, field, constraintValue)); } MinLength(JavaScriptSupport javaScriptSupport); void validate(Field field, Integer constraintValue, MessageFormatter formatter, String value); void render(Field field, Integer constraintValue, MessageFormatter formatter, MarkupWriter writer,
                       FormSupport formSupport);  }