Here is my code:
class dataInsert(FlaskForm): def my_length_check(form, field): if len(field.data) > 50: