function NotBlank::__construct
Parameters
array<string,mixed>|null $options:
bool|null $allowNull Whether to allow null values (defaults to false):
string[]|null $groups:
Overrides Constraint::__construct
File
-
vendor/
symfony/ validator/ Constraints/ NotBlank.php, line 42
Class
- NotBlank
- Validates that a value is not blank.
Namespace
Symfony\Component\Validator\ConstraintsCode
public function __construct(?array $options = null, ?string $message = null, ?bool $allowNull = null, ?callable $normalizer = null, ?array $groups = null, mixed $payload = null) {
parent::__construct($options ?? [], $groups, $payload);
$this->message = $message ?? $this->message;
$this->allowNull = $allowNull ?? $this->allowNull;
$this->normalizer = $normalizer ?? $this->normalizer;
if (null !== $this->normalizer && !\is_callable($this->normalizer)) {
throw new InvalidArgumentException(\sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer)));
}
}