protected function _validateSlug($instance)
    {
        $slug = $instance->get('eav_attribute')->get('name');
        $columns = $this->_table->schema()->columns();
        if (in_array($slug, $columns)) {
            $instance->get('eav_attribute')->errors('name', __d('field', 'The name "{0}" cannot be used as it collides with table column names.', $slug));
        }
    }
protected function _validateSlug($instance)
    {
        $slug = $instance->get('eav_attribute')->get('name');
        $columns = $this->_table->schema()->columns();
        if (in_array($slug, $columns)) {
            $instance->get('eav_attribute')->errors('name', __d('field', 'The name "{0}" cannot be used as it collides with table column names.', $slug));
        }
    }
protected function _validateSlug ( $ instance ) { $ slug = $ instance -> get ( 'eav_attribute' ) -> get ( 'name' ) ; $ columns = $ this -> _table -> schema ( ) -> columns ( ) ; if ( in_array ( $ slug , $ columns ) ) { $ instance -> get ( 'eav_attribute' ) -> errors ( 'name' , __d ( 'field' , 'The name "{0}" cannot be used as it collides with table column names.' , $ slug ) ) ; } }
Checks that the given instance's slug do not collide with table's real column
names.

If collision occurs, an error message will be registered on the given entity.

@param \Field\Model\Entity\FieldInstance $instance Instance to validate
@return void
Checks that the given instance s slug do not collide with table s real column names .