{"action":"created","issue":{"url":"https://api.github.com/repos/bem/bem-components/issues/1700","labels_url":"https://api.github.com/repos/bem/bem-components/issues/1700/labels{/name}","comments_url":"https://api.github.com/repos/bem/bem-components/issues/1700/comments","events_url":"https://api.github.com/repos/bem/bem-components/issues/1700/events","html_url":"https://github.com/bem/bem-components/issues/1700","id":114309376,"number":1700,"title":"Unable to mark input as required","user":{"login":"just-boris","id":812240,"avatar_url":"https://avatars.githubusercontent.com/u/812240?v=3","gravatar_id":"","url":"https://api.github.com/users/just-boris","html_url":"https://github.com/just-boris","followers_url":"https://api.github.com/users/just-boris/followers","following_url":"https://api.github.com/users/just-boris/following{/other_user}","gists_url":"https://api.github.com/users/just-boris/gists{/gist_id}","starred_url":"https://api.github.com/users/just-boris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/just-boris/subscriptions","organizations_url":"https://api.github.com/users/just-boris/orgs","repos_url":"https://api.github.com/users/just-boris/repos","events_url":"https://api.github.com/users/just-boris/events{/privacy}","received_events_url":"https://api.github.com/users/just-boris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-30T16:46:57Z","updated_at":"2015-10-30T17:03:00Z","closed_at":null,"body":"I am using bem-components from the [dist build](https://github.com/bem/bem-components-dist).\r\n\r\nNow I am wondering how to add `required` attribute to `<input />` tag to prevent undesired submits of empty form.\r\n\r\nAs I found in [the source code](https://github.com/bem/bem-components/blob/v2/common.blocks/input/__control/input__control.bh.js#L7-L14) there is a fixed set of attributes passed to the tag. Is there an ability to make this set extendable or add `required` option here?"},"comment":{"url":"https://api.github.com/repos/bem/bem-components/issues/comments/152587554","html_url":"https://github.com/bem/bem-components/issues/1700#issuecomment-152587554","issue_url":"https://api.github.com/repos/bem/bem-components/issues/1700","id":152587554,"user":{"login":"tadatuta","id":475746,"avatar_url":"https://avatars.githubusercontent.com/u/475746?v=3","gravatar_id":"","url":"https://api.github.com/users/tadatuta","html_url":"https://github.com/tadatuta","followers_url":"https://api.github.com/users/tadatuta/followers","following_url":"https://api.github.com/users/tadatuta/following{/other_user}","gists_url":"https://api.github.com/users/tadatuta/gists{/gist_id}","starred_url":"https://api.github.com/users/tadatuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadatuta/subscriptions","organizations_url":"https://api.github.com/users/tadatuta/orgs","repos_url":"https://api.github.com/users/tadatuta/repos","events_url":"https://api.github.com/users/tadatuta/events{/privacy}","received_events_url":"https://api.github.com/users/tadatuta/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T17:03:00Z","updated_at":"2015-10-30T17:03:00Z","body":"We treat all available fields in BEMJSON as a garanteed API for all supported browsers and as `required` is not implemented in IE 9 we intentionally ommited it.\r\n\r\nTo use it you should write something like\r\n```js\r\nblock('input').elem('control').attrs()(function() {\r\n    return this.extend(applyNext(), { required: this.ctx.required });\r\n});\r\n```"}}