phalcon/cphalcon — pull request #1316 by dreamsxin (2013-09-30 09:02:46+00:00)
Title: [NFR] Model validate

[NRF] Model::validate add param
```php
public function validation()
{
$this->validate('status', 'is_int');
$this->validate('status', array(
is_int',
'message' => 'status must be integer'
));
$this->validate('status', array(
array(
'is_int',
array('in_array', array(':value', array(1, 2, 3)))
),
'message' => 'status must be one of the available options'
));
$this->validate(new ExclusionIn(array(
'field' => 'status',
'domain' => array('A', 'I')
)));
if ($this->validationHasFailed() == true) {
return false;
}
}
```