added enum type validation
This commit is contained in:
parent
34f527adfc
commit
88fc0f1e95
1 changed files with 34 additions and 32 deletions
|
@ -282,6 +282,8 @@ class Doctrine_Validator extends Doctrine_Object
|
|||
case 'date':
|
||||
$validator = self::getValidator('date');
|
||||
return $validator->validate($var);
|
||||
case 'enum':
|
||||
return is_string($var) || is_int($var);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue