I have a code block: (Django code)
list_temp = [] tagname_re = re.compile(r'^[\w+\.-]+$', re.UNICODE) for key,tag in list.items(): if len(tag) > settings.FORM_MAX_LENGTH_OF_TAG or len(tag) < settings.FORM_MIN_LENGTH_OF_TAG: raise forms.ValidationError(_('please use between %(min)s and %(max)s characters in you tags') % { 'min': settings.FORM_MIN_LENGTH_OF_TAG, 'max': settings.FORM_MAX_LENGTH_OF_TAG}) if not tagname_re.match(tag): raise forms.ValidationError(_('please use following characters in tags: letters , numbers, and characters \'.-_\''))
This allows me to put the tag name in a Unicode character.
But I donβt know why with my Unicode (khmer uncode Khmer Symbols Range: 19E0-19FF Unicode Standard, version 4.0). I could not.
My question is:
How can I change the above code tagname_re = re.compile(r'^[\w+\.-]+$', re.UNICODE) to adapt my Unicode character. "If I enter a tag with" αααααΆα ", did I receive a message?
please use following characters in tags: letters , numbers, and characters \'.-_\''
source share