/** * Gets a <code>String</code> minimum validator for checking if a string length is greater than * the given minimum value. If that is not the case, then an error message will be generated * with the key "StringValidator.minimum". The message keys that can be used are: * <p> * <ul> * <li>${minimum}: the minimum length</li> * <li>${length}: the length of the user input</li> * <li>${input}: the input the user gave</li> * <li>${name}: the name of the <code>Component</code> that failed</li> * <li>${label}: the label of the <code>Component</code> - either comes from * <code>FormComponent.labelModel</code> or resource key [form-id].[form-component-id] in that * order</li> * </ul> * * @param minimum * the minimum length of the string * * @return the requested <code>StringValidator</code> */ public static StringValidator minimumLength(int minimum) { return new MinimumLengthValidator(minimum); } }
/** * Gets a <code>String</code> minimum validator for checking if a string length is greater * than the given minimum value. If that is not the case, then an error message will be * generated with the key "StringValidator.minimum". The message keys that can be used are: * <p> * <ul> * <li>${minimum}: the minimum length</li> * <li>${length}: the length of the user input</li> * <li>${input}: the input the user gave</li> * <li>${name}: the name of the <code>Component</code> that failed</li> * <li>${label}: the label of the <code>Component</code> - either comes from * <code>FormComponent.labelModel</code> or resource key [form-id].[form-component-id] in that * order</li> * </ul> * * @param minimum * the minimum length of the string * * @return the requested <code>StringValidator</code> */ public static StringValidator minimumLength(int minimum) { return new MinimumLengthValidator(minimum); } }