I would add one `if` here to skip some validation later:
```php
if (10 !== $valueLength && 13 !== $valueLength) {
    $this->context->addViolation($constraint->bothIsbnMessage);
}