{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/12554","repository_url":"https://api.github.com/repos/phalcon/cphalcon","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12554/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12554/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12554/events","html_url":"https://github.com/phalcon/cphalcon/issues/12554","id":201338415,"number":12554,"title":"Are there any known issues with Phalcon\\Validation\\Validator\\Uniqueness?","user":{"login":"garyrutland","id":3715101,"avatar_url":"https://avatars.githubusercontent.com/u/3715101?v=3","gravatar_id":"","url":"https://api.github.com/users/garyrutland","html_url":"https://github.com/garyrutland","followers_url":"https://api.github.com/users/garyrutland/followers","following_url":"https://api.github.com/users/garyrutland/following{/other_user}","gists_url":"https://api.github.com/users/garyrutland/gists{/gist_id}","starred_url":"https://api.github.com/users/garyrutland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyrutland/subscriptions","organizations_url":"https://api.github.com/users/garyrutland/orgs","repos_url":"https://api.github.com/users/garyrutland/repos","events_url":"https://api.github.com/users/garyrutland/events{/privacy}","received_events_url":"https://api.github.com/users/garyrutland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-01-17T16:35:29Z","updated_at":"2017-01-25T10:01:08Z","closed_at":null,"body":"Hi,\r\n\r\nI've been using this validator for a while now but recently updated from `3.0.0` to `3.0.3` and since then I've been getting an error stating `At least one model is required to build the query`.\r\n\r\nBelow is a sample of the code I am trying to run, is there any reason why this wouldn't work anymore?\r\nThe class this is taken from is extending `Phalcon\\Forms\\Form`.\r\n\r\n    <?php\r\n    \r\n    use App\\Models\\User;\r\n    use Phalcon\\Forms;\r\n    use Phalcon\\Validation\\Validator;\r\n    \r\n    $email = new Forms\\Element\\Email('email');\r\n    $email->setLabel('Email');\r\n    $email->setFilters([\r\n        'email',\r\n        'striptags',\r\n        'string',\r\n        'trim',\r\n    ]);\r\n    $email->addValidators([\r\n        new Validator\\PresenceOf([\r\n            'message' => 'Email is required',\r\n        ]),\r\n        new Validator\\Email(),\r\n        new Validator\\Uniqueness([\r\n            'model'   => new User(),\r\n            'message' => 'Email already exists',\r\n        ]),\r\n    ]);\r\n    $this->add($email);\r\n\r\nThanks,\r\nGary"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/275066630","html_url":"https://github.com/phalcon/cphalcon/issues/12554#issuecomment-275066630","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12554","id":275066630,"user":{"login":"stamster","id":12804479,"avatar_url":"https://avatars.githubusercontent.com/u/12804479?v=3","gravatar_id":"","url":"https://api.github.com/users/stamster","html_url":"https://github.com/stamster","followers_url":"https://api.github.com/users/stamster/followers","following_url":"https://api.github.com/users/stamster/following{/other_user}","gists_url":"https://api.github.com/users/stamster/gists{/gist_id}","starred_url":"https://api.github.com/users/stamster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stamster/subscriptions","organizations_url":"https://api.github.com/users/stamster/orgs","repos_url":"https://api.github.com/users/stamster/repos","events_url":"https://api.github.com/users/stamster/events{/privacy}","received_events_url":"https://api.github.com/users/stamster/received_events","type":"User","site_admin":false},"created_at":"2017-01-25T10:01:08Z","updated_at":"2017-01-25T10:01:08Z","body":"This should be fixed ASAP, as 3.0.x has been labelled LTS. \r\n"}}
{"actor":{"display_login":"stamster"}}