Validate bean instances or properties.
public function validate(bean:Object, groups:Array = null):Array
Validates all constraints on bean.
Parameters
| bean:Object — the bean to validate.
|
| |
| groups:Array (default = null) — an array of groups targeted for validation (default is
null, meaning that the Default group will be used).
|
Returns
| Array — an array of ConstraintValidation, possibly empty
or null.
|
public function validateProperty(bean:Object, propertyName:String, groups:Array = null):Array
Validates all constraints placed on the property of bean
named propertyName.
Parameters
| bean:Object — the bean holding the property to validate.
|
| |
| propertyName:String — the property name to validate.
|
| |
| groups:Array (default = null) — an array of groups targeted for validation (default is
null, meaning that the Default group will be used).
|
Returns
| Array — an array of ConstraintValidation, possibly empty
or null.
|
public function validateValue(type:Type, propertyName:String, value:Array, groups:* = null):Array
Validates all constraints placed on the property named propertyName
of the class type would the property value be value.
Parameters
| type:Type — the bean type holding the property to validate.
|
| |
| propertyName:String — the property name to validate.
|
| |
| value:Array — the property value to validate.
|
| |
| groups:* (default = null) — an array of groups targeted for validation (default is
null, meaning that the Default group will be used).
|
Returns
| Array — an array of ConstraintValidation, possibly empty
or null.
|