tomchristie/django-rest-framework — pull request #875 by commonorgarden (2013-05-20 12:16:20+00:00)
Title: Issue 874 - Update SlugField to raise validation errors for invalid slugs

I've made the following changes:
- a new test `SlugFieldTests.test_invalid_slug` which demonstrates the problem.
- modified the definition of `fields.SlugField` to fix it. Mostly a cut-and-paste from `fields.EmailField`.

Please check carefully - the tests run successfully but this is my first submission and I am not 100% certain of any wider consequences of my changes!