Abstract Class Yiisoft\Validator\Rule\Date\BaseDate
Public Methods
Method Details
| public mixed __construct ( ?string $format, ?string $timeZone, ?string $locale, integer|string|DateTimeInterface|null $min, integer|string|DateTimeInterface|null $max, ?string $messageFormat, ?string $incorrectInputMessage, ?string $tooEarlyMessage, ?string $tooLateMessage, boolean|callable|null $skipOnEmpty, boolean $skipOnError, ?\Closure $when ) | ||
| $format | ?string | |
| $timeZone | ?string | |
| $locale | ?string | |
| $min | integer|string|DateTimeInterface|null | |
| $max | integer|string|DateTimeInterface|null | |
| $messageFormat | ?string | |
| $incorrectInputMessage | ?string | |
| $tooEarlyMessage | ?string | |
| $tooLateMessage | ?string | |
| $skipOnEmpty | boolean|callable|null | |
| $skipOnError | boolean | |
| $when | ?\Closure | |
public function __construct(
private ?string $format,
private ?string $timeZone,
private ?string $locale,
private int|string|DateTimeInterface|null $min,
private int|string|DateTimeInterface|null $max,
private ?string $messageFormat,
private ?string $incorrectInputMessage,
private ?string $tooEarlyMessage,
private ?string $tooLateMessage,
bool|callable|null $skipOnEmpty,
private bool $skipOnError,
private ?Closure $when,
) {
$this->skipOnEmpty = $skipOnEmpty;
}
Defined in: Yiisoft\Validator\RuleInterface::getHandler()
A matching handler name or an instance used for processing this rule.
While not required, for naming of handlers' classes it's recommended to use a rule class name with "Handler"
suffix, so for FilledAtLeast rule class name the handler class name will be FilledAtLeastHandler and so on.
All packages handlers are stored within the same namespace as rules, but this is not a strict requirement.
| public abstract Yiisoft\Validator\RuleHandlerInterface|string getHandler ( ) | ||
| return | Yiisoft\Validator\RuleHandlerInterface|string |
A rule handler name (for example |
|---|---|---|
public function getHandler(): string|RuleHandlerInterface;
| public ?string getIncorrectInputMessage ( ) |
public function getIncorrectInputMessage(): ?string
{
return $this->incorrectInputMessage;
}
| public \DateTimeInterface|int|string|null getMax ( ) |
public function getMax(): DateTimeInterface|int|string|null
{
return $this->max;
}
| public ?string getMessageFormat ( ) |
public function getMessageFormat(): ?string
{
return $this->messageFormat;
}
| public \DateTimeInterface|int|string|null getMin ( ) |
public function getMin(): DateTimeInterface|int|string|null
{
return $this->min;
}
Defined in: Yiisoft\Validator\Rule\Trait\SkipOnEmptyTrait::getSkipOnEmpty()
A getter for $skipOnEmpty property.
| public boolean|callable|null getSkipOnEmpty ( ) | ||
| return | boolean|callable|null |
A current raw (non-normalized) value. |
|---|---|---|
public function getSkipOnEmpty(): bool|callable|null
{
return $this->skipOnEmpty;
}
| public non-empty-string|null getTimeZone ( ) |
public function getTimeZone(): ?string
{
return $this->timeZone;
}
| public ?string getTooEarlyMessage ( ) |
public function getTooEarlyMessage(): ?string
{
return $this->tooEarlyMessage;
}
| public ?string getTooLateMessage ( ) |
public function getTooLateMessage(): ?string
{
return $this->tooLateMessage;
}
Defined in: Yiisoft\Validator\Rule\Trait\WhenTrait::getWhen()
A getter for $when property.
| public Closure|null getWhen ( ) | ||
| return | Closure|null |
Current value:
|
|---|---|---|
public function getWhen(): ?Closure
{
return $this->when;
}
Defined in: Yiisoft\Validator\Rule\Trait\SkipOnErrorTrait::shouldSkipOnError()
A getter for $skipOnError property.
| public boolean shouldSkipOnError ( ) | ||
| return | boolean |
Current value. |
|---|---|---|
public function shouldSkipOnError(): bool
{
return $this->skipOnError;
}
Defined in: Yiisoft\Validator\Rule\Trait\SkipOnEmptyTrait::skipOnEmpty()
An immutable setter to change $skipOnEmpty property.
| public $this skipOnEmpty ( boolean|callable|null $value ) | ||
| $value | boolean|callable|null |
A new value. |
| return | $this |
The new instance with a changed value. |
|---|---|---|
public function skipOnEmpty(bool|callable|null $value): static
{
$new = clone $this;
$new->skipOnEmpty = $value;
return $new;
}
Defined in: Yiisoft\Validator\Rule\Trait\SkipOnErrorTrait::skipOnError()
An immutable setter to change $skipOnError property.
| public $this skipOnError ( boolean $value ) | ||
| $value | boolean |
A new value. |
| return | $this |
The new instance with a changed value. |
|---|---|---|
public function skipOnError(bool $value): static
{
$new = clone $this;
$new->skipOnError = $value;
return $new;
}
Defined in: Yiisoft\Validator\Rule\Trait\WhenTrait::when()
An immutable setter to change $when property.
| public $this when ( Closure|null $value ) | ||
| $value | Closure|null |
A new value:
|
| return | $this |
The new instance with a changed value. |
|---|---|---|
public function when(?Closure $value): static
{
$new = clone $this;
$new->when = $value;
return $new;
}
Signup or Login in order to comment.