{"action":"closed","issue":{"url":"https://api.github.com/repos/oTree-org/otree-core/issues/271","labels_url":"https://api.github.com/repos/oTree-org/otree-core/issues/271/labels{/name}","comments_url":"https://api.github.com/repos/oTree-org/otree-core/issues/271/comments","events_url":"https://api.github.com/repos/oTree-org/otree-core/issues/271/events","html_url":"https://github.com/oTree-org/otree-core/issues/271","id":56321937,"number":271,"title":"Form validation: separate \"bounds\" into min_value and max_value","user":{"login":"oTree-org","id":5423929,"avatar_url":"https://avatars.githubusercontent.com/u/5423929?v=3","gravatar_id":"","url":"https://api.github.com/users/oTree-org","html_url":"https://github.com/oTree-org","followers_url":"https://api.github.com/users/oTree-org/followers","following_url":"https://api.github.com/users/oTree-org/following{/other_user}","gists_url":"https://api.github.com/users/oTree-org/gists{/gist_id}","starred_url":"https://api.github.com/users/oTree-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oTree-org/subscriptions","organizations_url":"https://api.github.com/users/oTree-org/orgs","repos_url":"https://api.github.com/users/oTree-org/repos","events_url":"https://api.github.com/users/oTree-org/events{/privacy}","received_events_url":"https://api.github.com/users/oTree-org/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oTree-org/otree-core/labels/consultant","name":"consultant","color":"009800"},{"url":"https://api.github.com/repos/oTree-org/otree-core/labels/p2","name":"p2","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"leliel12","id":299010,"avatar_url":"https://avatars.githubusercontent.com/u/299010?v=3","gravatar_id":"","url":"https://api.github.com/users/leliel12","html_url":"https://github.com/leliel12","followers_url":"https://api.github.com/users/leliel12/followers","following_url":"https://api.github.com/users/leliel12/following{/other_user}","gists_url":"https://api.github.com/users/leliel12/gists{/gist_id}","starred_url":"https://api.github.com/users/leliel12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leliel12/subscriptions","organizations_url":"https://api.github.com/users/leliel12/orgs","repos_url":"https://api.github.com/users/leliel12/repos","events_url":"https://api.github.com/users/leliel12/events{/privacy}","received_events_url":"https://api.github.com/users/leliel12/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-02-03T01:45:33Z","updated_at":"2015-02-08T18:44:15Z","closed_at":"2015-02-08T18:44:15Z","body":"Sometimes an app programmer might want to specify only the upper bound or only the lower bound for a field. So, we should consider splitting the \"bounds\" field kwarg and method into \"min_value\" and \"max_value\".\r\n\r\nFor example:\r\n\r\nfoo = models.IntegerField(bounds = [4,10])\r\n\r\nWould become:\r\n\r\nfoo = models.IntegerField(min_value=4,max_value=10])\r\n\r\n(The method FIELD_bounds() should also be split into 2 separate methods, although as those methods should go on the view, not the model, as described in #239. )\r\n\r\nThis would follow the naming convention of max_length and max_digits.\r\n\r\nWe could also call them \"min\" and \"max\" but those are the names of built-in Python functions. Or we could call them \"lower\" and \"upper\" but that is not as clear, in Sent from my iPhone\r\n\r\nAnother benefit of doing this is that we can add a \"step size\" argument later. I think that is clearer than adding step size to \"bounds\":\r\n\r\nbounds=[4,10,2]"}}