def slug_validator(s, ok=SLUG_OK, lower=True, spaces=False, delimiter='-', message=validate_slug.message, code=validate_slug.code):
 if (not (s and (slugify(s, ok, lower, spaces, delimiter) == s))):
  raise ValidationError(message, code=code)

def slug_validator ( s , ok = SLUG_OK , lower = True , spaces = False , delimiter = '-' , message = validate_slug . message , code = validate_slug . code ) : if ( not ( s and ( slugify ( s , ok , lower , spaces , delimiter ) == s ) ) ) : raise ValidationError ( message , code = code )
raise an error if the string has any punctuation characters .