increase max question length for InteracETransfer to 160 characters #969

This commit is contained in:
woodser 2024-05-29 07:08:16 -04:00
parent cf1fabd0bb
commit 0919d92ce4
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ public class InteracETransferQuestionValidator extends InputValidator {
public InteracETransferQuestionValidator(LengthValidator lengthValidator, RegexValidator regexValidator) {
lengthValidator.setMinLength(1);
lengthValidator.setMaxLength(40);
lengthValidator.setMaxLength(160);
this.lengthValidator = lengthValidator;
regexValidator.setPattern("[A-Za-z0-9\\-\\_\\'\\,\\.\\? ]+");

View File

@ -53,7 +53,7 @@ public class InteracETransferQuestionValidatorTest {
assertFalse(validator.validate(null).isValid); // null
assertFalse(validator.validate("").isValid); // empty
assertFalse(validator.validate("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ").isValid); // too long
assertFalse(validator.validate("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ").isValid); // too long
assertFalse(validator.validate("abc !@#").isValid); // invalid characters
}