PHP Class Constraint_dimension, silverstripe-zenvalidator

Inheritance: extends ZenValidatorConstraint
显示文件 Open project: sheadawson/silverstripe-zenvalidator Class Usage Examples

Protected Properties

Property Type Description
$type string
$val1 integer
$val2 integer

Public Methods

Method Description
__construct ( string $type, integer $val1, integer $val2 = null ) Constructor
getDefaultMessage ( ) : string Gets the default message for the validator
validate ( Mixed $value ) : boolean Validate function called for validator.

Method Details

__construct() public method

Constructor
public __construct ( string $type, integer $val1, integer $val2 = null )
$type string Type of validation
$val1 integer First value
$val2 integer Second value

getDefaultMessage() public method

Gets the default message for the validator
public getDefaultMessage ( ) : string
return string the validation message

validate() public method

Validate function called for validator.
public validate ( Mixed $value ) : boolean
$value Mixed the value of the field being validated.
return boolean

Property Details

$type protected_oe property

protected string $type
return string

$val1 protected_oe property

protected int $val1
return integer

$val2 protected_oe property

protected int $val2
return integer