项目中使用redis存储,key-value方式,在Redis中字符串类型的Value最多可以容纳的数据长度是512M 官方信息: A String value can be at max 512 Megabytes in length. 摘自: http://redis.io/topics/data-types
class NumberForm(BaseForm): querynumber = forms.CharField(error_messages={'required':u'请输入手机号'}) def clean_querynumber(self): number = self.cleaned_data.get('querynumber') re_number = r'^1(3|5|7|8)[0-9]{9}$' if len(number) >11 or len(number)<11 : ra