diff --git a/app/main/forms.py b/app/main/forms.py index 82b3a7c7..d9f369fd 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1,5 +1,5 @@ from flask_wtf import FlaskForm -from wtforms import MultipleFileField, SelectField, StringField, SubmitField +from wtforms import MultipleFileField, StringField, SubmitField from wtforms.validators import DataRequired, Length @@ -8,12 +8,12 @@ class CreateCorpusForm(FlaskForm): 'Description', validators=[DataRequired(), Length(1, 64)] ) - files = MultipleFileField('Files') + files = MultipleFileField('Files', validators=[DataRequired()]) + submit = SubmitField('Create corpus') title = StringField( 'Title', validators=[DataRequired(), Length(1, 32)] ) - submit = SubmitField('Create corpus') ''' def validate_files(form, field): for file in form.files.getlist[field.name]: