示例#1
0
def email_address_validator(value):
    if not is_valid_email_address(value):
        raise ValidationError(_('Enter a valid email address.'), code='invalid')
    return value
示例#2
0
文件: fields.py 项目: pasala91/test
def email_address_validator(value):
    if not is_valid_email_address(value):
        raise ValidationError(_("Enter a valid email address."),
                              code="invalid")
    return value