-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathforms.py
More file actions
18 lines (15 loc) · 886 Bytes
/
Copy pathforms.py
File metadata and controls
18 lines (15 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from wtforms import Form, StringField, DecimalField, IntegerField, TextAreaField, PasswordField, validators
#form used on Register page
class RegisterForm(Form):
name = StringField('Full Name', [validators.Length(min=1,max=50)])
username = StringField('Username', [validators.Length(min=4,max=25)])
email = StringField('Email', [validators.Length(min=6,max=50)])
password = PasswordField('Password', [validators.DataRequired(), validators.EqualTo('confirm', message='Passwords do not match')])
confirm = PasswordField('Confirm Password')
#form used on the Transactions page
class SendMoneyForm(Form):
username = StringField('Username', [validators.Length(min=4,max=25)])
amount = StringField('Amount', [validators.Length(min=1,max=50)])
#form used on the Buy page
class BuyForm(Form):
amount = StringField('Amount', [validators.Length(min=1,max=50)])