models.py cellphone = models.CharField('电话', max_length=20, validators=[CellPhoneValidator]) from django.core.validators import RegexValidator CellPhoneValidator = RegexValidator(r'^\+?\d[\d\-]+\d$', message=u'请输入有效电话号码')