class Illuminate / Validation / Rules / Dimensions
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Dimensions

Implements

  • Stringable

Uses

Properties

protected

$constraints array

The constraints for the dimensions rule.

Default: []

Methods

public

__construct ( array $constraints ) : void

Create a new dimensions rule instance.

Parameters

  • $constraints array
public

width ( $value ) : $this

Set the "width" constraint.

Parameters

  • $value int
public

height ( $value ) : $this

Set the "height" constraint.

Parameters

  • $value int
public

minWidth ( $value ) : $this

Set the "min width" constraint.

Parameters

  • $value int
public

minHeight ( $value ) : $this

Set the "min height" constraint.

Parameters

  • $value int
public

maxWidth ( $value ) : $this

Set the "max width" constraint.

Parameters

  • $value int
public

maxHeight ( $value ) : $this

Set the "max height" constraint.

Parameters

  • $value int
public

ratio ( $value ) : $this

Set the "ratio" constraint.

Parameters

  • $value float
public

__toString ( ) : string

Convert the rule to a validation string.