class Dimensions extends ObjectValidationAttribute

Methods

static string
keyword()

Get the Validator rule keyword.

create(string ...$parameters)

Create the attribute from parsed string parameters.

string
__toString()

Get the rule in Validator string form.

static mixed
parseDateValue(mixed $value)

Parse a validation date value.

static mixed
parseBooleanValue(mixed $value)

Parse a validation boolean value.

parseFieldReference(string|FieldReference $reference)

Parse a field reference.

mixed
normalizePossibleExternalReferenceParameter(mixed $parameter)

Resolve a possible external reference parameter.

object|string
getRule(ValidationPath $path)

Get the Validator rule object.

__construct(int|string|ExternalReference|null $minWidth = null, int|string|ExternalReference|null $minHeight = null, int|string|ExternalReference|null $maxWidth = null, int|string|ExternalReference|null $maxHeight = null, float|string|ExternalReference|null $ratio = null, int|string|ExternalReference|null $width = null, int|string|ExternalReference|null $height = null, Dimensions|null $rule = null)

Create a dimensions rule attribute.

Details

at line 97
static string keyword()

Get the Validator rule keyword.

Return Value

string

at line 105
static ValidationAttribute create(string ...$parameters)

Create the attribute from parsed string parameters.

Parameters

string ...$parameters

Return Value

ValidationAttribute

string __toString()

Get the rule in Validator string form.

Return Value

string

static protected mixed parseDateValue(mixed $value)

Parse a validation date value.

Parameters

mixed $value

Return Value

mixed

static protected mixed parseBooleanValue(mixed $value)

Parse a validation boolean value.

Parameters

mixed $value

Return Value

mixed

protected FieldReference parseFieldReference(string|FieldReference $reference)

Parse a field reference.

Parameters

string|FieldReference $reference

Return Value

FieldReference

protected mixed normalizePossibleExternalReferenceParameter(mixed $parameter)

Resolve a possible external reference parameter.

Parameters

mixed $parameter

Return Value

mixed

at line 47
object|string getRule(ValidationPath $path)

Get the Validator rule object.

Parameters

ValidationPath $path

Return Value

object|string

at line 20
__construct(int|string|ExternalReference|null $minWidth = null, int|string|ExternalReference|null $minHeight = null, int|string|ExternalReference|null $maxWidth = null, int|string|ExternalReference|null $maxHeight = null, float|string|ExternalReference|null $ratio = null, int|string|ExternalReference|null $width = null, int|string|ExternalReference|null $height = null, Dimensions|null $rule = null)

Create a dimensions rule attribute.

Parameters

int|string|ExternalReference|null $minWidth
int|string|ExternalReference|null $minHeight
int|string|ExternalReference|null $maxWidth
int|string|ExternalReference|null $maxHeight
float|string|ExternalReference|null $ratio
int|string|ExternalReference|null $width
int|string|ExternalReference|null $height
Dimensions|null $rule