number = $number; } /** * @inheritDoc */ public function validate(ValidationContext $context, Schema $schema): ?ValidationError { if ($context->currentData() > $this->number) { return null; } return $this->error($schema, $context, 'exclusiveMinimum', "Number must be greater than {min}", [ 'min' => $this->number, ]); } }