public function execute(&$value, &$error) { $conceptId = $this->getContext()->getRequest()->getParameter('id'); $c = new Criteria(); $c->add(ConceptPeer::URI, $value); $object = ConceptPeer::doSelectOne($c); if ($object) { //check to see if the retrieved object has the same id if ($conceptId && $object->getId() == $conceptId) { return true; } else { $error = $this->getParameter('unique_error'); return false; } } return true; }