{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/11584","repository_url":"https://api.github.com/repos/phalcon/cphalcon","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11584/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11584/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11584/events","html_url":"https://github.com/phalcon/cphalcon/issues/11584","id":143023223,"number":11584,"title":"Phalcon\\Forms\\Element\\Radio does not properly validate","user":{"login":"googlle","id":2455916,"avatar_url":"https://avatars.githubusercontent.com/u/2455916?v=3","gravatar_id":"","url":"https://api.github.com/users/googlle","html_url":"https://github.com/googlle","followers_url":"https://api.github.com/users/googlle/followers","following_url":"https://api.github.com/users/googlle/following{/other_user}","gists_url":"https://api.github.com/users/googlle/gists{/gist_id}","starred_url":"https://api.github.com/users/googlle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlle/subscriptions","organizations_url":"https://api.github.com/users/googlle/orgs","repos_url":"https://api.github.com/users/googlle/repos","events_url":"https://api.github.com/users/googlle/events{/privacy}","received_events_url":"https://api.github.com/users/googlle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-23T17:13:38Z","updated_at":"2016-03-25T12:13:42Z","closed_at":null,"body":"Hi. I get errors when validate form\r\n```php\r\n//messages for field type1\r\nType1 is required. \r\nType1 InclusionIn.\r\n//messages for field type2\r\nType2 is required\r\nType2 InclusionIn\r\n```\r\n```php\r\n//Post data\r\n[\"type\"]=>\r\n  string(1) \"2\"\r\n```\r\n\r\n```php\r\n$type1 = new Radio(\"type1\");\r\n$type1->setAttributes(array(\r\n    'required' => true,\r\n    'autocomplete' => 'off',\r\n    'checked' => 'checked',\r\n    'name' => 'type',\r\n    'value' => 1\r\n));\r\n$type1->setFilters(array('int'));\r\n$type1->addValidators(array(\r\n    new PresenceOf(array(\r\n        'message' => 'Type1 is required'\r\n    )),\r\n    new InclusionIn(array(\r\n        'message' => 'Type1 InclusionIn',\r\n        'domain' => array(\r\n            1,2\r\n        )\r\n    )),\r\n));\r\n$this->add($type1);\r\n\r\n$type2 = new Radio(\"type2\");\r\n$type2->setAttributes(array(\r\n    'required' => true,\r\n    'autocomplete' => 'off',\r\n    'name' => 'type',\r\n    'value' => 2\r\n));\r\n$type2->setFilters(array('int'));\r\n$type2->addValidators(array(\r\n    new PresenceOf(array(\r\n        'message' => 'Type2 is required'\r\n    )),\r\n    new InclusionIn(array(\r\n        'message' => 'Type2 InclusionIn',\r\n        'domain' => array(\r\n            1,2\r\n        )\r\n    )),\r\n));\r\n$this->add($type2);\r\n```\r\n\r\nI don't understand, post data is sent correctly. But the validation of the elements fails. Initially, the PresenceOf validator reports that there is no such value, then the other"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/201256563","html_url":"https://github.com/phalcon/cphalcon/issues/11584#issuecomment-201256563","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11584","id":201256563,"user":{"login":"Jurigag","id":10086991,"avatar_url":"https://avatars.githubusercontent.com/u/10086991?v=3","gravatar_id":"","url":"https://api.github.com/users/Jurigag","html_url":"https://github.com/Jurigag","followers_url":"https://api.github.com/users/Jurigag/followers","following_url":"https://api.github.com/users/Jurigag/following{/other_user}","gists_url":"https://api.github.com/users/Jurigag/gists{/gist_id}","starred_url":"https://api.github.com/users/Jurigag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jurigag/subscriptions","organizations_url":"https://api.github.com/users/Jurigag/orgs","repos_url":"https://api.github.com/users/Jurigag/repos","events_url":"https://api.github.com/users/Jurigag/events{/privacy}","received_events_url":"https://api.github.com/users/Jurigag/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T12:13:42Z","updated_at":"2016-03-25T12:13:42Z","body":"But constructor parameter in radio is name too."}}