-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
15 lines (12 loc) · 805 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from wtforms import Form, StringField, DecimalField, IntegerField, TextAreaField, PasswordField, validators
class RegisterForm(Form):
name = StringField('Full Name', [validators.Length(min=1, max=50)])
username = StringField('Username', [validators.Length(min=4, max=25)])
email = StringField('Full Name', [validators.Length(min=6, max=50)])
password = PasswordField('Password', [validators.DataRequired(), validators.EqualTo('confirm', message='Passwords do no match.')])
confirm = PasswordField('Confirm Password')
class SendMoneyForm(Form):
username = StringField('Username', [validators.Length(min=4, max=25)])
amount = StringField('Amount', [validators.Length(min=1, max=50)])
class BuyForm(Form):
amount = StringField('Amount', [validators.Length(min=1, max=50)])