Вот решение моей проблемы
/**
* {@inheritDoc}
*/
protected function _validationRules()
{
$qntValidSelect = new Zend_Db_Select(Zend_Db_Table_Abstract::getDefaultAdapter());
$qntValidSelect
->from(OptionTableMap::TABLE_NAME)
->where('Name = ?', $this->getData('name'))
->where('ThingId = ?', $this->getData('thingId'));
return [
'name' => [
self::PRESENCE => self::PRESENCE_REQUIRED,
'NotEmpty',
[
'StringLength',
['max' => 255],
],
],
'slug' => [
self::PRESENCE => self::PRESENCE_REQUIRED,
'NotEmpty',
[
'StringLength',
['max' => 255],
],
],
'thingId' => [
self::PRESENCE => self::PRESENCE_REQUIRED,
'NotEmpty',
[
'StringLength',
['max' => 11],
],
[
'Regex',
['pattern' => '/^[1-9]\d*$/'],
],
[
'DB_RecordExists',
[
'table' => ThingTableMap::getTableMap()->getName(),
'field' => ThingTableMap::getTableMap()->getColumn('id')->getName(),
]
],
],
'select' => [
[
'Regex',
['pattern' => '/^[01]*$/'],
],
],
'accounting' => [
[
'Regex',
['pattern' => '/^[01]*$/'],
],
],
];
}