Class P3ArrayValidator
CArrayValidator validates that the attribute value is of certain length.
Note, this validator should only be used with Array-typed attributes.
- CComponent
- CValidator
- P3ArrayValidator
Copyright: Copyright © 2005-2012 diemeisterei GmbH
License: http://www.phundament.com/license/
Author: Tobias Munk <schmunk@usrbin.de>
Since: 3.0.3
Located at phundament/p3extensions/validators/P3ArrayValidator.php
Methods summary
protected
|
#
validateAttribute( CModel $object, Array $attribute )
Validates the attribute of the object. If there is any error, the error message is added to the object. |
Methods inherited from CValidator
addError()
,
applyTo()
,
clientValidateAttribute()
,
createValidator()
,
isEmpty()
,
validate()
Methods inherited from CComponent
__call()
,
__get()
,
__isset()
,
__set()
,
__unset()
,
asa()
,
attachBehavior()
,
attachBehaviors()
,
attachEventHandler()
,
canGetProperty()
,
canSetProperty()
,
detachBehavior()
,
detachBehaviors()
,
detachEventHandler()
,
disableBehavior()
,
disableBehaviors()
,
enableBehavior()
,
enableBehaviors()
,
evaluateExpression()
,
getEventHandlers()
,
hasEvent()
,
hasEventHandler()
,
hasProperty()
,
raiseEvent()
Magic methods summary
Properties summary
public
integer
|
$max |
#
maximum length. Defaults to null, meaning no maximum limit. |
public
integer
|
$min |
#
minimum length. Defaults to null, meaning no minimum limit. |
public
integer
|
$is |
#
exact length. Defaults to null, meaning no exact length limit. |
public
Array
|
$tooShort |
#
user-defined error message used when the value is too long. |
public
Array
|
$tooLong |
#
user-defined error message used when the value is too short. |
public
boolean
|
$allowEmpty |
#
whether the attribute value can be null or empty. Defaults to true, meaning that if the attribute is empty, it is considered valid. |
Properties inherited from CValidator
$attributes
,
$builtInValidators
,
$enableClientValidation
,
$except
,
$message
,
$on
,
$safe
,
$skipOnError