Skip to content

Glossary: Django Basics

clean_<field> method

Also written: clean_message, clean_product, clean_quantity, clean_ method

A form method named `clean_` plus a field name that adds your own check for that field. It returns the value if fine, or raises `ValidationError`.

Where the book teaches it

Related terms

ValidationErrorcleaned_datais_valid()