> It was possible in the past with validator_list. Like:
>
> regex = r'^[A-z][\w-]{2,31}$'
>
> name = models.CharField(max_length=32, unique=True ,
> validator_list=[validators.MatchesRegularExpression(regex)] )
>
It still is? http://docs.djangoproject.com/en/dev/ref/models/fields/#validators
+ http://docs.djangoproject.com/en/1.2/ref/validators/#regexvalidator
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment