@Test public void checkRangeLengthMin4Max6Invalid7() { mField.set("1234567"); mField.addRangeLengthValidator("must be between 4 and 6", 4, 6); assertThat(mField.isValid(), is(false)); }
public ValiFieldText addRangeLengthValidator(int minLength, int maxLength) { return addRangeLengthValidator(getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), minLength, maxLength); }
ValiFieldText extends ValiFieldBase<String> { public ValiFieldText addRangeLengthValidator(int minLength, int maxLength) { return addRangeLengthValidator(getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), minLength, maxLength); } }
ValiFieldText extends ValiFieldBase<String> { public ValiFieldText addRangeLengthValidator(int minLength, int maxLength) { return addRangeLengthValidator(getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), minLength, maxLength); } ValiFieldText();  ValiFieldText(@Nullable String defaultValue);  ValiFieldText(@Nullable String defaultValue, boolean markAsChanged); }
ValiFieldText extends ValiFieldBase<String> { public ValiFieldText addRangeLengthValidator(int minLength, int maxLength) { return addRangeLengthValidator(getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), minLength, maxLength); } ValiFieldText();  ValiFieldText(@Nullable String defaultValue);  ValiFieldText(@Nullable String defaultValue, boolean markAsChanged); @Override String toString(); @Override ValiFieldText setEmptyAllowed(boolean isEmptyAllowed); ValiFieldText addPatternValidator(@StringRes int errorResource, final Pattern pattern); ValiFieldText addPatternValidator(String errorMessage, final Pattern pattern); ValiFieldText addNotEmptyValidator(); ValiFieldText addNotEmptyValidator(@StringRes int errorResource); ValiFieldText addNotEmptyValidator(String errorMessage); ValiFieldText addMinLengthValidator(int minLength); ValiFieldText addMinLengthValidator(@StringRes int errorResource, int minLength); ValiFieldText addMinLengthValidator(String errorMessage, final int minLength); ValiFieldText addExactLengthValidator(int exactLength); ValiFieldText addExactLengthValidator(@StringRes int errorResource, int exactLength); ValiFieldText addExactLengthValidator(String errorMessage, final int exactLength); ValiFieldText addMaxLengthValidator(int maxLength); ValiFieldText addMaxLengthValidator(@StringRes int errorResource, int maxLength); ValiFieldText addMaxLengthValidator(String errorMessage, final int maxLength); ValiFieldText addRangeLengthValidator(int minLength, int maxLength); ValiFieldText addRangeLengthValidator(@StringRes int errorResource, int minLength, int maxLength); ValiFieldText addRangeLengthValidator(String errorMessage, final int minLength, final int maxLength); ValiFieldText addEmailValidator(String errorMessage); ValiFieldText addPasswordValidator(String errorMessage); ValiFieldText addUsernameValidator(String errorMessage); ValiFieldText addPhoneValidator(String errorMessage); }
ValiFieldText extends ValiFieldBase<String> { public ValiFieldText addRangeLengthValidator(int minLength, int maxLength) { return addRangeLengthValidator(getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), minLength, maxLength); } ValiFieldText();  ValiFieldText(@Nullable String defaultValue);  ValiFieldText(@Nullable String defaultValue, boolean markAsChanged); @Override String toString(); @Override ValiFieldText setEmptyAllowed(boolean isEmptyAllowed); ValiFieldText addPatternValidator(@StringRes int errorResource, final Pattern pattern); ValiFieldText addPatternValidator(String errorMessage, final Pattern pattern); ValiFieldText addNotEmptyValidator(); ValiFieldText addNotEmptyValidator(@StringRes int errorResource); ValiFieldText addNotEmptyValidator(String errorMessage); ValiFieldText addMinLengthValidator(int minLength); ValiFieldText addMinLengthValidator(@StringRes int errorResource, int minLength); ValiFieldText addMinLengthValidator(String errorMessage, final int minLength); ValiFieldText addExactLengthValidator(int exactLength); ValiFieldText addExactLengthValidator(@StringRes int errorResource, int exactLength); ValiFieldText addExactLengthValidator(String errorMessage, final int exactLength); ValiFieldText addMaxLengthValidator(int maxLength); ValiFieldText addMaxLengthValidator(@StringRes int errorResource, int maxLength); ValiFieldText addMaxLengthValidator(String errorMessage, final int maxLength); ValiFieldText addRangeLengthValidator(int minLength, int maxLength); ValiFieldText addRangeLengthValidator(@StringRes int errorResource, int minLength, int maxLength); ValiFieldText addRangeLengthValidator(String errorMessage, final int minLength, final int maxLength); ValiFieldText addEmailValidator(String errorMessage); ValiFieldText addPasswordValidator(String errorMessage); ValiFieldText addUsernameValidator(String errorMessage); ValiFieldText addPhoneValidator(String errorMessage);  }