make sure num_books also has a value, not just a positive one, so I am force to fill it in on submit
This commit is contained in:
@@ -33,7 +33,7 @@ class SeriesSchema(ma.SQLAlchemyAutoSchema):
|
||||
class SeriesForm(FlaskForm):
|
||||
id = HiddenField()
|
||||
title = StringField('Title:', [validators.DataRequired()])
|
||||
num_books = IntegerField('Number of Books:', [validators.NumberRange(min=1)])
|
||||
num_books = IntegerField('Number of Books:', [validators.DataRequired(), validators.NumberRange(min=1)])
|
||||
calcd_rating = StringField('Avg Rating:' )
|
||||
note = TextAreaField('Notes:')
|
||||
submit = SubmitField('Save' )
|
||||
|
||||
Reference in New Issue
Block a user