eZPublishCommunityProject  2013.4
eZ\Publish\Core\FieldType\Validator\StringLengthValidator Class Reference
+ Inheritance diagram for eZ\Publish\Core\FieldType\Validator\StringLengthValidator:
+ Collaboration diagram for eZ\Publish\Core\FieldType\Validator\StringLengthValidator:

Public Member Functions

 validate (BaseValue $value)
 Checks if the string $value is in desired range. More...
 
 validateConstraints ($constraints)
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\Validator
 __get ($name)
 Magic getter. More...
 
 __set ($name, $value)
 Magic setter. More...
 
 getConstraintsSchema ()
 Returns a schema for supported validator configurations. More...
 
 getMessage ()
 Returns array of messages on performed validations. More...
 
 initializeWithConstraints (array $constraints)
 Initialized an instance of Validator, with earlier configured constraints. More...
 
 validate (Value $value)
 Perform validation on $value. More...
 
 validateConstraints ($constraints)
 

Protected Attributes

 $constraints
 
 $constraintsSchema
 
- Protected Attributes inherited from eZ\Publish\Core\FieldType\Validator
 $constraints = array()
 
 $constraintsSchema = array()
 
 $errors = array()
 

Member Function Documentation

eZ\Publish\Core\FieldType\Validator\StringLengthValidator::validate ( BaseValue  $value)

Checks if the string $value is in desired range.

The range is determined by $maxStringLength and $minStringLength.

Parameters
\eZ\Publish\Core\FieldType\TextLine\Value$value
Returns
boolean
eZ\Publish\Core\FieldType\Validator\StringLengthValidator::validateConstraints (   $constraints)

Member Data Documentation

eZ\Publish\Core\FieldType\Validator\StringLengthValidator::$constraints
protected
Initial value:
= array(
"maxStringLength" => false,
"minStringLength" => false
)

Referenced by eZ\Publish\Core\FieldType\Validator\StringLengthValidator\validateConstraints().

eZ\Publish\Core\FieldType\Validator\StringLengthValidator::$constraintsSchema
protected
Initial value:
= array(
"minStringLength" => array(
"type" => "int",
"default" => 0
),
"maxStringLength" => array(
"type" => "int",
"default" => null
)
)

The documentation for this class was generated from the following file: