Form rendering, validation, and CSRF protection for Flask with WTForms.
72
{
"context": "This criteria evaluates how well the engineer uses Flask-WTF's FileRequired validator to implement file upload validation. The focus is on proper usage of Flask-WTF's file upload field and validation components to ensure files are present before processing.",
"type": "weighted_checklist",
"checklist": [
{
"name": "FileField Usage",
"description": "Uses Flask-WTF's FileField class (from flask_wtf.file) for the document field in DocumentUploadForm",
"max_score": 30
},
{
"name": "FileRequired Validator",
"description": "Applies the FileRequired validator (from flask_wtf.file) to the document field to enforce file presence",
"max_score": 40
},
{
"name": "FlaskForm Inheritance",
"description": "DocumentUploadForm correctly inherits from FlaskForm (from flask_wtf) to enable Flask-specific form features",
"max_score": 15
},
{
"name": "Form Validation",
"description": "Uses Flask-WTF's validation methods (validate() or validate_on_submit()) in the process_upload function to check form validity",
"max_score": 15
}
]
}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