{"action":"opened","number":72,"pull_request":{"url":"https://api.github.com/repos/chrismiles/EZForm/pulls/72","id":27833399,"html_url":"https://github.com/chrismiles/EZForm/pull/72","diff_url":"https://github.com/chrismiles/EZForm/pull/72.diff","patch_url":"https://github.com/chrismiles/EZForm/pull/72.patch","issue_url":"https://api.github.com/repos/chrismiles/EZForm/issues/72","number":72,"state":"open","locked":false,"title":"Introducing modelValue and valueTransformer to address differences in field value vs display","user":{"login":"zats","id":2688806,"avatar_url":"https://avatars.githubusercontent.com/u/2688806?v=3","gravatar_id":"","url":"https://api.github.com/users/zats","html_url":"https://github.com/zats","followers_url":"https://api.github.com/users/zats/followers","following_url":"https://api.github.com/users/zats/following{/other_user}","gists_url":"https://api.github.com/users/zats/gists{/gist_id}","starred_url":"https://api.github.com/users/zats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zats/subscriptions","organizations_url":"https://api.github.com/users/zats/orgs","repos_url":"https://api.github.com/users/zats/repos","events_url":"https://api.github.com/users/zats/events{/privacy}","received_events_url":"https://api.github.com/users/zats/received_events","type":"User","site_admin":false},"body":"Added two properties on `EZFormField`:  `modelValue` and `valueTransformer`\r\nUsed to definitive between \"model\" level value and \"presented\" (field) value. \r\n`valueTransformer` is a concept taken from Mantle: it converts `model` value into a `field` value and vice versa \r\nAPI is backward compatible but allows a cleaner separation when you want to display values differently comparing to what you store in your model. An example:\r\n\r\n```objectivec\r\nnumberFormatter.numberStyle = NSNumberFormatterSpellOutStyle;\r\nEZFormTextField *field = [form formFieldForKey:@\"count\"];\r\nfield.valueTransformer = [EZReversableValueTransformer reversableValueTransformerWithForwardBlock:^id(NSString *value) {\r\n    return [numberFormatter numberFromString:value];\r\n} reverseBlock:^id(NSNumber *number) {\r\n    return [numberFormatter stringFromNumber:number];\r\n}];\r\n```\r\n\r\nPlus slight syntax modernisation.","created_at":"2015-01-22T10:53:27Z","updated_at":"2015-01-22T10:53:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chrismiles/EZForm/pulls/72/commits","review_comments_url":"https://api.github.com/repos/chrismiles/EZForm/pulls/72/comments","review_comment_url":"https://api.github.com/repos/chrismiles/EZForm/pulls/comments/{number}","comments_url":"https://api.github.com/repos/chrismiles/EZForm/issues/72/comments","statuses_url":"https://api.github.com/repos/chrismiles/EZForm/statuses/36c0c8cb38f5daf3df6600e2e30dfbf643ffbc7c","head":{"label":"Wondermall:master","ref":"master","sha":"36c0c8cb38f5daf3df6600e2e30dfbf643ffbc7c","user":{"login":"Wondermall","id":7196338,"avatar_url":"https://avatars.githubusercontent.com/u/7196338?v=3","gravatar_id":"","url":"https://api.github.com/users/Wondermall","html_url":"https://github.com/Wondermall","followers_url":"https://api.github.com/users/Wondermall/followers","following_url":"https://api.github.com/users/Wondermall/following{/other_user}","gists_url":"https://api.github.com/users/Wondermall/gists{/gist_id}","starred_url":"https://api.github.com/users/Wondermall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wondermall/subscriptions","organizations_url":"https://api.github.com/users/Wondermall/orgs","repos_url":"https://api.github.com/users/Wondermall/repos","events_url":"https://api.github.com/users/Wondermall/events{/privacy}","received_events_url":"https://api.github.com/users/Wondermall/received_events","type":"Organization","site_admin":false},"repo":{"id":26076135,"name":"EZForm","full_name":"Wondermall/EZForm","owner":{"login":"Wondermall","id":7196338,"avatar_url":"https://avatars.githubusercontent.com/u/7196338?v=3","gravatar_id":"","url":"https://api.github.com/users/Wondermall","html_url":"https://github.com/Wondermall","followers_url":"https://api.github.com/users/Wondermall/followers","following_url":"https://api.github.com/users/Wondermall/following{/other_user}","gists_url":"https://api.github.com/users/Wondermall/gists{/gist_id}","starred_url":"https://api.github.com/users/Wondermall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wondermall/subscriptions","organizations_url":"https://api.github.com/users/Wondermall/orgs","repos_url":"https://api.github.com/users/Wondermall/repos","events_url":"https://api.github.com/users/Wondermall/events{/privacy}","received_events_url":"https://api.github.com/users/Wondermall/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wondermall/EZForm","description":"iOS form handling and validation library.","fork":true,"url":"https://api.github.com/repos/Wondermall/EZForm","forks_url":"https://api.github.com/repos/Wondermall/EZForm/forks","keys_url":"https://api.github.com/repos/Wondermall/EZForm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wondermall/EZForm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wondermall/EZForm/teams","hooks_url":"https://api.github.com/repos/Wondermall/EZForm/hooks","issue_events_url":"https://api.github.com/repos/Wondermall/EZForm/issues/events{/number}","events_url":"https://api.github.com/repos/Wondermall/EZForm/events","assignees_url":"https://api.github.com/repos/Wondermall/EZForm/assignees{/user}","branches_url":"https://api.github.com/repos/Wondermall/EZForm/branches{/branch}","tags_url":"https://api.github.com/repos/Wondermall/EZForm/tags","blobs_url":"https://api.github.com/repos/Wondermall/EZForm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wondermall/EZForm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wondermall/EZForm/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wondermall/EZForm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wondermall/EZForm/statuses/{sha}","languages_url":"https://api.github.com/repos/Wondermall/EZForm/languages","stargazers_url":"https://api.github.com/repos/Wondermall/EZForm/stargazers","contributors_url":"https://api.github.com/repos/Wondermall/EZForm/contributors","subscribers_url":"https://api.github.com/repos/Wondermall/EZForm/subscribers","subscription_url":"https://api.github.com/repos/Wondermall/EZForm/subscription","commits_url":"https://api.github.com/repos/Wondermall/EZForm/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wondermall/EZForm/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wondermall/EZForm/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wondermall/EZForm/issues/comments/{number}","contents_url":"https://api.github.com/repos/Wondermall/EZForm/contents/{+path}","compare_url":"https://api.github.com/repos/Wondermall/EZForm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wondermall/EZForm/merges","archive_url":"https://api.github.com/repos/Wondermall/EZForm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wondermall/EZForm/downloads","issues_url":"https://api.github.com/repos/Wondermall/EZForm/issues{/number}","pulls_url":"https://api.github.com/repos/Wondermall/EZForm/pulls{/number}","milestones_url":"https://api.github.com/repos/Wondermall/EZForm/milestones{/number}","notifications_url":"https://api.github.com/repos/Wondermall/EZForm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wondermall/EZForm/labels{/name}","releases_url":"https://api.github.com/repos/Wondermall/EZForm/releases{/id}","created_at":"2014-11-02T09:12:23Z","updated_at":"2014-11-02T12:31:15Z","pushed_at":"2014-11-02T13:47:05Z","git_url":"git://github.com/Wondermall/EZForm.git","ssh_url":"git@github.com:Wondermall/EZForm.git","clone_url":"https://github.com/Wondermall/EZForm.git","svn_url":"https://github.com/Wondermall/EZForm","homepage":null,"size":380,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"chrismiles:master","ref":"master","sha":"2eb06ec71f2f5221b6a93669c4b8cd6777bb53a6","user":{"login":"chrismiles","id":110112,"avatar_url":"https://avatars.githubusercontent.com/u/110112?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismiles","html_url":"https://github.com/chrismiles","followers_url":"https://api.github.com/users/chrismiles/followers","following_url":"https://api.github.com/users/chrismiles/following{/other_user}","gists_url":"https://api.github.com/users/chrismiles/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismiles/subscriptions","organizations_url":"https://api.github.com/users/chrismiles/orgs","repos_url":"https://api.github.com/users/chrismiles/repos","events_url":"https://api.github.com/users/chrismiles/events{/privacy}","received_events_url":"https://api.github.com/users/chrismiles/received_events","type":"User","site_admin":false},"repo":{"id":4270434,"name":"EZForm","full_name":"chrismiles/EZForm","owner":{"login":"chrismiles","id":110112,"avatar_url":"https://avatars.githubusercontent.com/u/110112?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismiles","html_url":"https://github.com/chrismiles","followers_url":"https://api.github.com/users/chrismiles/followers","following_url":"https://api.github.com/users/chrismiles/following{/other_user}","gists_url":"https://api.github.com/users/chrismiles/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismiles/subscriptions","organizations_url":"https://api.github.com/users/chrismiles/orgs","repos_url":"https://api.github.com/users/chrismiles/repos","events_url":"https://api.github.com/users/chrismiles/events{/privacy}","received_events_url":"https://api.github.com/users/chrismiles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chrismiles/EZForm","description":"iOS form handling and validation library.","fork":false,"url":"https://api.github.com/repos/chrismiles/EZForm","forks_url":"https://api.github.com/repos/chrismiles/EZForm/forks","keys_url":"https://api.github.com/repos/chrismiles/EZForm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrismiles/EZForm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrismiles/EZForm/teams","hooks_url":"https://api.github.com/repos/chrismiles/EZForm/hooks","issue_events_url":"https://api.github.com/repos/chrismiles/EZForm/issues/events{/number}","events_url":"https://api.github.com/repos/chrismiles/EZForm/events","assignees_url":"https://api.github.com/repos/chrismiles/EZForm/assignees{/user}","branches_url":"https://api.github.com/repos/chrismiles/EZForm/branches{/branch}","tags_url":"https://api.github.com/repos/chrismiles/EZForm/tags","blobs_url":"https://api.github.com/repos/chrismiles/EZForm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrismiles/EZForm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrismiles/EZForm/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrismiles/EZForm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrismiles/EZForm/statuses/{sha}","languages_url":"https://api.github.com/repos/chrismiles/EZForm/languages","stargazers_url":"https://api.github.com/repos/chrismiles/EZForm/stargazers","contributors_url":"https://api.github.com/repos/chrismiles/EZForm/contributors","subscribers_url":"https://api.github.com/repos/chrismiles/EZForm/subscribers","subscription_url":"https://api.github.com/repos/chrismiles/EZForm/subscription","commits_url":"https://api.github.com/repos/chrismiles/EZForm/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrismiles/EZForm/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrismiles/EZForm/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrismiles/EZForm/issues/comments/{number}","contents_url":"https://api.github.com/repos/chrismiles/EZForm/contents/{+path}","compare_url":"https://api.github.com/repos/chrismiles/EZForm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrismiles/EZForm/merges","archive_url":"https://api.github.com/repos/chrismiles/EZForm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrismiles/EZForm/downloads","issues_url":"https://api.github.com/repos/chrismiles/EZForm/issues{/number}","pulls_url":"https://api.github.com/repos/chrismiles/EZForm/pulls{/number}","milestones_url":"https://api.github.com/repos/chrismiles/EZForm/milestones{/number}","notifications_url":"https://api.github.com/repos/chrismiles/EZForm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrismiles/EZForm/labels{/name}","releases_url":"https://api.github.com/repos/chrismiles/EZForm/releases{/id}","created_at":"2012-05-09T10:03:38Z","updated_at":"2015-01-16T04:04:28Z","pushed_at":"2014-10-06T09:25:46Z","git_url":"git://github.com/chrismiles/EZForm.git","ssh_url":"git@github.com:chrismiles/EZForm.git","clone_url":"https://github.com/chrismiles/EZForm.git","svn_url":"https://github.com/chrismiles/EZForm","homepage":null,"size":942,"stargazers_count":254,"watchers_count":254,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":13,"forks":66,"open_issues":13,"watchers":254,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chrismiles/EZForm/pulls/72"},"html":{"href":"https://github.com/chrismiles/EZForm/pull/72"},"issue":{"href":"https://api.github.com/repos/chrismiles/EZForm/issues/72"},"comments":{"href":"https://api.github.com/repos/chrismiles/EZForm/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/chrismiles/EZForm/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/chrismiles/EZForm/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/chrismiles/EZForm/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/chrismiles/EZForm/statuses/36c0c8cb38f5daf3df6600e2e30dfbf643ffbc7c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":8,"additions":174,"deletions":329,"changed_files":29}}