Comment 10 for bug 1233501

Revision history for this message
Romain Hardouin (romain-hardouin) wrote : Re: Security group names cannot contain at characters

Matthew, don't worry about empty string, fields are required. So, if we leave the name or description empty, a message "This field is required" will be printed.
The "*" is here to be more generic if this validator need to be apply somewhere, on an potentially optional field (blank=True).

As for ISO-8859-1, maybe I was unclear. Forget the old name, terrific, ISO-8859-1 ;-)
Just read "subset of the first 256 code points of Unicode". This was my idea to allow diacritics.

I use the \x notation since to my mind: '\x20' == u'\u0020'. Is it confusing?
Also, I disallow \x7F to \x9F since they are control characters.

I agree with you, the best solution would be to allow all printable Unicode characters.
But AFAIK Python 2 regex doesn't allow unicode stuff [1] like \X or \p{L}\p{M}*+ which would also require possessive quantifiers.
So I don't know how to implement this full Unicode solution.

[1] : http://www.regular-expressions.info/unicode.html