Beispiel #1
0
def validate_email_address(form, field):
    if not EMAIL_ADDRESS_REGEX.match(field.data):
        raise ValidationError("Invalid email address format")
Beispiel #2
0
def validate_combined_email_address(form, field):
    if not EMAIL_ADDRESS_REGEX.match("%s@%s" % (form.data['username'], form.data['domain'])):
        raise ValidationError("Invalid email address format")