Skip to content

Commit

Permalink
remove wtforms email validator
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Apr 23, 2020
1 parent 947ee5c commit 5d9d6e6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions eNMS/services/examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

# WTForms Field Validators
from wtforms.validators import (
Email,
InputRequired,
IPAddress,
Length,
Expand Down Expand Up @@ -111,10 +110,8 @@ class ExampleForm(ServiceForm):
# The "InputRequired" validator is used: this field is mandatory.
string2 = StringField("String 2 (required)", [InputRequired()])

# The main address field uses two validators:
# - The input length must be comprised between 7 and 25 characters
# - The input syntax must match that of an email address.
mail_address = StringField("Mail address", [Length(min=7, max=25), Email()])
# The main address length must be comprised between 7 and 25 characters
mail_address = StringField("Mail address", [Length(min=7, max=25)])

# This IP address validator will ensure the user input is a valid IPv4 address.
# If it isn't, you can set the error message to be displayed in the GUI.
Expand Down

0 comments on commit 5d9d6e6

Please sign in to comment.