Commits

George Notaras  committed a22b542

Improved slug validator.

  • Participants
  • Parent commits 7ea4fd3

Comments (0)

Files changed (1)

File src/primary_slug/forms.py

 from primary_slug import settings
 
 
+
 slug_re = re.compile(r'^[%s]+$' % settings.PRIMARY_SLUG_VALID_CHARS)
 validate_slug = RegexValidator(slug_re, _(u"Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens."), 'invalid')
-
+    
 class PrimarySlugFormField(SlugField):
     default_validators = [validate_slug]