function IsbnValidator::getMessage
File
-
vendor/
symfony/ validator/ Constraints/ IsbnValidator.php, line 169
Class
- IsbnValidator
- Validates whether the value is a valid ISBN-10 or ISBN-13.
Namespace
Symfony\Component\Validator\ConstraintsCode
protected function getMessage(Isbn $constraint, ?string $type = null) : string {
if (null !== $constraint->message) {
return $constraint->message;
}
elseif (Isbn::ISBN_10 === $type) {
return $constraint->isbn10Message;
}
elseif (Isbn::ISBN_13 === $type) {
return $constraint->isbn13Message;
}
return $constraint->bothIsbnMessage;
}