30 extends Zend_Validate_Abstract
32 const NAME_EMPTY =
'columnTypeEmpty';
33 const INVALID =
'columnTypeInvalid';
38 protected $_messageTemplates = array(
39 self::NAME_EMPTY =>
"Column type can not be empty",
40 self::INVALID =>
"Column type %value% is not a valid type"
46 protected $_columnTypes = array(
95 $value = $schema->__get(
'type');
98 $this->_error(self::NAME_EMPTY);
101 if ($schema && $schema->isDirty(
'type')) {
102 if (!in_array(strtoupper($value), $this->_columnTypes)) {
103 $this->_error(self::INVALID, $value);