Fix max length string validation in FormData
continuous-integration/drone/push Build encountered an error Details
continuous-integration/drone/tag Build encountered an error Details

This commit is contained in:
Lexi / Zoe 2021-12-29 18:36:02 +01:00
parent bdd0f520b4
commit d2fe2e9a8d
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ abstract class FormData
throw new InputValidationError("$fieldName is required.");
} elseif (strlen($raw) < $minLength) {
throw new InputValidationError("$fieldName is too short (minimum $minLength characters).");
} elseif (strlen($raw) > 100) {
} elseif (strlen($raw) > $maxLength) {
throw new InputValidationError("$fieldName is too long (maximum $maxLength characters).");
}
return $raw;