Cleaning a Whole Form4:28 with Kenneth Love
Sometimes you need to clean several fields together or you just need a check on the *entire* form.
You'll find that a lot of beginners use
clean() way more often than they use validators or
clean_FIELDNAME(). Don't fall into this habit! When you're working with Django, and pretty much any other framework, you want to override and customize the smallest possible piece. It's less impact on your form to override
clean_email and check a length or value than to override
clean() and do the same. Always try to find what creates the least impact.
You need to sign up for Treehouse in order to download course files.Sign up