-
Notifications
You must be signed in to change notification settings - Fork 0
/
player_form.py
43 lines (41 loc) · 973 Bytes
/
player_form.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from wtforms import StringField, DateField, IntegerField, SelectField
from wtforms.validators import NumberRange, DataRequired, Length
from flask_wtf import FlaskForm
class Player_Form(FlaskForm):
id = IntegerField(
"ID",
validators=[
NumberRange(1,15)
,DataRequired()
])
name = StringField(
"Player's Name",
validators=[
DataRequired(),
Length(max=30)
])
ign = StringField(
"In Game Name",
validators=[
DataRequired(),
Length(max=30)
]
)
location = StringField(
"Player's Location",
validators=[
Length(max=30)
]
)
b_mo = IntegerField(
"Birth Month",
validators=[
NumberRange(min=1, max=12)
]
)
b_day = IntegerField(
"Birth Date",
validators=[
NumberRange(min=1, max=31)
]
)