Abstract Class Yiisoft\Validator\Rule\Date\BaseDate
Psalm Types
| Name | Value |
|---|---|
| IntlDateFormatterFormat | \IntlDateFormatter::FULL|\IntlDateFormatter::LONG|\IntlDateFormatter::MEDIUM|\IntlDateFormatter::SHORT|\IntlDateFormatter::NONE |
Public Methods
Method Details
| public __construct( string|null $format, string|null $timeZone, string|null $locale, integer|string|DateTimeInterface|null $min, integer|string|DateTimeInterface|null $max, string|null $messageFormat, string|null $incorrectInputMessage, string|null $tooEarlyMessage, string|null $tooLateMessage, boolean|callable|null $skipOnEmpty, boolean $skipOnError, Closure|null $when ): mixed | ||
| $format | string|null | |
| $timeZone | string|null | |
| $locale | string|null | |
| $min | integer|string|DateTimeInterface|null | |
| $max | integer|string|DateTimeInterface|null | |
| $messageFormat | string|null | |
| $incorrectInputMessage | string|null | |
| $tooEarlyMessage | string|null | |
| $tooLateMessage | string|null | |
| $skipOnEmpty | boolean|callable|null | |
| $skipOnError | boolean | |
| $when | Closure|null | |
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 getHandler( ): Yiisoft\Validator\RuleHandlerInterface|string | ||
| return | Yiisoft\Validator\RuleHandlerInterface|string |
A rule handler name (for example |
|---|---|---|
public function getHandler(): string|RuleHandlerInterface;
| public getIncorrectInputMessage( ): string|null |
public function getIncorrectInputMessage(): ?string
{
return $this->incorrectInputMessage;
}
| public getMax( ): DateTimeInterface|integer|string|null |
public function getMax(): DateTimeInterface|int|string|null
{
return $this->max;
}
| public getMessageFormat( ): string|null |
public function getMessageFormat(): ?string
{
return $this->messageFormat;
}
| public getMin( ): DateTimeInterface|integer|string|null |
public function getMin(): DateTimeInterface|int|string|null
{
return $this->min;
}
Defined in: Yiisoft\Validator\Rule\Trait\SkipOnEmptyTrait::getSkipOnEmpty()
A getter for $skipOnEmpty property.
| public getSkipOnEmpty( ): boolean|callable|null | ||
| return | boolean|callable|null |
A current raw (non-normalized) value. |
|---|---|---|
public function getSkipOnEmpty(): bool|callable|null
{
return $this->skipOnEmpty;
}
| public getTimeZone( ): non-empty-string|null |
public function getTimeZone(): ?string
{
return $this->timeZone;
}
| public getTooEarlyMessage( ): string|null |
public function getTooEarlyMessage(): ?string
{
return $this->tooEarlyMessage;
}
| public getTooLateMessage( ): string|null |
public function getTooLateMessage(): ?string
{
return $this->tooLateMessage;
}
Defined in: Yiisoft\Validator\Rule\Trait\WhenTrait::getWhen()
A getter for $when property.
| public getWhen( ): Closure|null | ||
| 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 shouldSkipOnError( ): boolean | ||
| 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 skipOnEmpty( boolean|callable|null $value ): $this | ||
| $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 skipOnError( boolean $value ): $this | ||
| $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 when( Closure|null $value ): $this | ||
| $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.