{"action":"created","issue":{"url":"https://api.github.com/repos/spree/spree/issues/6415","labels_url":"https://api.github.com/repos/spree/spree/issues/6415/labels{/name}","comments_url":"https://api.github.com/repos/spree/spree/issues/6415/comments","events_url":"https://api.github.com/repos/spree/spree/issues/6415/events","html_url":"https://github.com/spree/spree/pull/6415","id":78726759,"number":6415,"title":"Add validations to Spree::Order","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-05-20T22:31:02Z","updated_at":"2015-05-22T17:58:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6415","html_url":"https://github.com/spree/spree/pull/6415","diff_url":"https://github.com/spree/spree/pull/6415.diff","patch_url":"https://github.com/spree/spree/pull/6415.patch"},"body":"* This focuses most on improving the existing validations and adding\r\n  validations for the totals that are updated based on user input."},"comment":{"url":"https://api.github.com/repos/spree/spree/issues/comments/104729586","html_url":"https://github.com/spree/spree/pull/6415#issuecomment-104729586","issue_url":"https://api.github.com/repos/spree/spree/issues/6415","id":104729586,"user":{"login":"dkubb","id":133,"avatar_url":"https://avatars.githubusercontent.com/u/133?v=3","gravatar_id":"","url":"https://api.github.com/users/dkubb","html_url":"https://github.com/dkubb","followers_url":"https://api.github.com/users/dkubb/followers","following_url":"https://api.github.com/users/dkubb/following{/other_user}","gists_url":"https://api.github.com/users/dkubb/gists{/gist_id}","starred_url":"https://api.github.com/users/dkubb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkubb/subscriptions","organizations_url":"https://api.github.com/users/dkubb/orgs","repos_url":"https://api.github.com/users/dkubb/repos","events_url":"https://api.github.com/users/dkubb/events{/privacy}","received_events_url":"https://api.github.com/users/dkubb/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T17:58:20Z","updated_at":"2015-05-22T17:58:20Z","body":">  I find regex tough to understand and easy to break\r\n\r\nHere's an explanation of the regexp:\r\n\r\nhttp://rick.measham.id.au/paste/explain.pl?regex=%5CA-%3F%5Cd%2B%28%3F%3A%5C.%5Cd%7B1%2C2%7D%29%3F%5Cz\r\n\r\nI disagree that it's difficult to understand, IMHO as far as regexps go it's relatively simple.\r\n\r\nIn what way do you think *valid* input would break it? The only thing I could think of is perhaps if you had a monetary value with more than 2 significant digits in the decimal place; but that's an easy fix, we could just change `\\d{1,2}` to `\\d{1,}`, so that 1 or more digits would be allowed."}}