{"action":"created","issue":{"url":"https://api.github.com/repos/allcount/allcountjs/issues/4","labels_url":"https://api.github.com/repos/allcount/allcountjs/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/allcount/allcountjs/issues/4/comments","events_url":"https://api.github.com/repos/allcount/allcountjs/issues/4/events","html_url":"https://github.com/allcount/allcountjs/issues/4","id":53834649,"number":4,"title":"Form field values validation","user":{"login":"paveltiunov","id":323320,"avatar_url":"https://avatars.githubusercontent.com/u/323320?v=3","gravatar_id":"","url":"https://api.github.com/users/paveltiunov","html_url":"https://github.com/paveltiunov","followers_url":"https://api.github.com/users/paveltiunov/followers","following_url":"https://api.github.com/users/paveltiunov/following{/other_user}","gists_url":"https://api.github.com/users/paveltiunov/gists{/gist_id}","starred_url":"https://api.github.com/users/paveltiunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paveltiunov/subscriptions","organizations_url":"https://api.github.com/users/paveltiunov/orgs","repos_url":"https://api.github.com/users/paveltiunov/repos","events_url":"https://api.github.com/users/paveltiunov/events{/privacy}","received_events_url":"https://api.github.com/users/paveltiunov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/allcount/allcountjs/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/allcount/allcountjs/milestones/10","html_url":"https://github.com/allcount/allcountjs/milestones/Roadmap","labels_url":"https://api.github.com/repos/allcount/allcountjs/milestones/10/labels","id":1362161,"number":10,"title":"Roadmap","description":"","creator":{"login":"paveltiunov","id":323320,"avatar_url":"https://avatars.githubusercontent.com/u/323320?v=3","gravatar_id":"","url":"https://api.github.com/users/paveltiunov","html_url":"https://github.com/paveltiunov","followers_url":"https://api.github.com/users/paveltiunov/followers","following_url":"https://api.github.com/users/paveltiunov/following{/other_user}","gists_url":"https://api.github.com/users/paveltiunov/gists{/gist_id}","starred_url":"https://api.github.com/users/paveltiunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paveltiunov/subscriptions","organizations_url":"https://api.github.com/users/paveltiunov/orgs","repos_url":"https://api.github.com/users/paveltiunov/repos","events_url":"https://api.github.com/users/paveltiunov/events{/privacy}","received_events_url":"https://api.github.com/users/paveltiunov/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-10-18T08:54:41Z","updated_at":"2015-10-18T08:55:49Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-01-09T05:17:40Z","updated_at":"2015-11-05T20:16:06Z","closed_at":null,"body":"Support form field values validation that defined as follows\r\n```\r\nA.app({\r\n  ...,\r\n  entities: function(Fields) {\r\n    return {\r\n      Student: {\r\n        ...,\r\n        validate: function (Entity) {\r\n          if (Entity.classHours < 100 || Entity.classHours > 500) {\r\n            return {classHours: 'Should be in range from 100 to 500'};\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/allcount/allcountjs/issues/comments/154178148","html_url":"https://github.com/allcount/allcountjs/issues/4#issuecomment-154178148","issue_url":"https://api.github.com/repos/allcount/allcountjs/issues/4","id":154178148,"user":{"login":"paveltiunov","id":323320,"avatar_url":"https://avatars.githubusercontent.com/u/323320?v=3","gravatar_id":"","url":"https://api.github.com/users/paveltiunov","html_url":"https://github.com/paveltiunov","followers_url":"https://api.github.com/users/paveltiunov/followers","following_url":"https://api.github.com/users/paveltiunov/following{/other_user}","gists_url":"https://api.github.com/users/paveltiunov/gists{/gist_id}","starred_url":"https://api.github.com/users/paveltiunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paveltiunov/subscriptions","organizations_url":"https://api.github.com/users/paveltiunov/orgs","repos_url":"https://api.github.com/users/paveltiunov/repos","events_url":"https://api.github.com/users/paveltiunov/events{/privacy}","received_events_url":"https://api.github.com/users/paveltiunov/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T20:16:06Z","updated_at":"2015-11-05T20:16:06Z","body":"@jmas very interesting. Probably we can add some sort of syntax sugar on top of `validate()` or `beforeSave()`. For example we can introduce generic `Fields.integer('Count').validate(function (value) {})` and wire `min` and `max` syntax sugar methods. What do you think?"}}