mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-14 01:50:40 +00:00
Cleanup of tests to push into live system
This commit is contained in:
@ -8,23 +8,24 @@ from wtforms import (
|
||||
ValidationError
|
||||
)
|
||||
from wtforms.validators import (
|
||||
InputRequired,
|
||||
DataRequired,
|
||||
Email,
|
||||
Length,
|
||||
Regexp
|
||||
)
|
||||
from app.models import User
|
||||
from app.auth import USERNAME_REGEX
|
||||
from app.wtf_validators import FileSizeLimit
|
||||
|
||||
class EditProfileSettingsForm(FlaskForm):
|
||||
email = StringField(
|
||||
'E-Mail',
|
||||
validators=[InputRequired(), Length(max=254), Email()]
|
||||
validators=[DataRequired(), Length(max=254), Email()]
|
||||
)
|
||||
username = StringField(
|
||||
'Username',
|
||||
validators=[
|
||||
InputRequired(),
|
||||
DataRequired(),
|
||||
Length(max=64),
|
||||
Regexp(
|
||||
USERNAME_REGEX,
|
||||
@ -53,7 +54,8 @@ class EditProfileSettingsForm(FlaskForm):
|
||||
|
||||
class EditPublicProfileInformationForm(FlaskForm):
|
||||
avatar = FileField(
|
||||
'Image File'
|
||||
'Image File',
|
||||
[FileSizeLimit(max_size_in_mb=2)]
|
||||
)
|
||||
full_name = StringField(
|
||||
'Full name',
|
||||
|
Reference in New Issue
Block a user