{"action":"opened","issue":{"url":"https://api.github.com/repos/schematics/schematics/issues/459","repository_url":"https://api.github.com/repos/schematics/schematics","labels_url":"https://api.github.com/repos/schematics/schematics/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/schematics/schematics/issues/459/comments","events_url":"https://api.github.com/repos/schematics/schematics/issues/459/events","html_url":"https://github.com/schematics/schematics/issues/459","id":188401509,"number":459,"title":"Field with regex + required constraints doesn't throw error when using get_mock_object","user":{"login":"HalfAiden","id":5873528,"avatar_url":"https://avatars.githubusercontent.com/u/5873528?v=3","gravatar_id":"","url":"https://api.github.com/users/HalfAiden","html_url":"https://github.com/HalfAiden","followers_url":"https://api.github.com/users/HalfAiden/followers","following_url":"https://api.github.com/users/HalfAiden/following{/other_user}","gists_url":"https://api.github.com/users/HalfAiden/gists{/gist_id}","starred_url":"https://api.github.com/users/HalfAiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HalfAiden/subscriptions","organizations_url":"https://api.github.com/users/HalfAiden/orgs","repos_url":"https://api.github.com/users/HalfAiden/repos","events_url":"https://api.github.com/users/HalfAiden/events{/privacy}","received_events_url":"https://api.github.com/users/HalfAiden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-10T01:59:31Z","updated_at":"2016-11-10T01:59:31Z","closed_at":null,"body":"In the instance where the regex constraint is used on a field and the field is required, fairly the constraint is not met, but importantly a MockCreationError is not thrown.\r\n\r\n```\r\nclass M(Model):\r\n    a = StringType(required=True, regex='a valid regex pattern')\r\n\r\nm = M.get_mock_object()\r\n```\r\n\r\n`m.a` is a random string that doesn't match the regex pattern. Expected behaviour would to have had MockCreationError thrown instead of an incorrect string population."}}
{"actor":{"display_login":"HalfAiden"}}