Fix max length string validation in FormData
This commit is contained in:
parent
bdd0f520b4
commit
d2fe2e9a8d
|
|
@ -20,7 +20,7 @@ abstract class FormData
|
||||||
throw new InputValidationError("$fieldName is required.");
|
throw new InputValidationError("$fieldName is required.");
|
||||||
} elseif (strlen($raw) < $minLength) {
|
} elseif (strlen($raw) < $minLength) {
|
||||||
throw new InputValidationError("$fieldName is too short (minimum $minLength characters).");
|
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).");
|
throw new InputValidationError("$fieldName is too long (maximum $maxLength characters).");
|
||||||
}
|
}
|
||||||
return $raw;
|
return $raw;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue