File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1010
1111# WTForms Field Validators
1212from wtforms .validators import (
13- Email ,
1413 InputRequired ,
1514 IPAddress ,
1615 Length ,
@@ -111,10 +110,8 @@ class ExampleForm(ServiceForm):
111110 # The "InputRequired" validator is used: this field is mandatory.
112111 string2 = StringField ("String 2 (required)" , [InputRequired ()])
113112
114- # The main address field uses two validators:
115- # - The input length must be comprised between 7 and 25 characters
116- # - The input syntax must match that of an email address.
117- mail_address = StringField ("Mail address" , [Length (min = 7 , max = 25 ), Email ()])
113+ # The main address length must be comprised between 7 and 25 characters
114+ mail_address = StringField ("Mail address" , [Length (min = 7 , max = 25 )])
118115
119116 # This IP address validator will ensure the user input is a valid IPv4 address.
120117 # If it isn't, you can set the error message to be displayed in the GUI.
You can’t perform that action at this time.
0 commit comments