Form rendering, validation, and CSRF protection for Flask with WTForms.
72
{
"context": "This criteria evaluates how well the engineer uses Flask-WTF's MultipleFileField and associated file upload validators to implement a photo gallery upload form. The focus is on proper usage of MultipleFileField for handling multiple file uploads, FileAllowed for extension validation, and FileSize for size validation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "MultipleFileField usage",
"description": "Uses MultipleFileField from flask_wtf.file to create a field that accepts multiple file uploads in the PhotoGalleryForm class.",
"max_score": 30
},
{
"name": "FileAllowed validator",
"description": "Applies the FileAllowed validator to the multiple file field with the correct allowed extensions (jpg, png, gif) to restrict uploads to image files only.",
"max_score": 25
},
{
"name": "FileSize validator",
"description": "Applies the FileSize validator to the multiple file field with min=10240 (10KB) and max=5242880 (5MB) to enforce file size boundaries.",
"max_score": 25
},
{
"name": "FileRequired validator",
"description": "Uses DataRequired or a similar validator to ensure at least one file is uploaded, or implements custom validation to check that the file list is not empty.",
"max_score": 10
},
{
"name": "FlaskForm integration",
"description": "PhotoGalleryForm correctly inherits from FlaskForm to enable automatic CSRF protection and request data binding.",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-flask-wtfevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10