API in forms-Free Django Tutorials
I hope you have checked our last post on forms in which we have covered on form.is_valid() to validate data. So continuing that in which we have entered some wrong data as following: data = {‘subject’: ”, ‘message’: ‘Hi there’, ‘sender’: ‘invalid email address’, ‘cc_myself’: True} f = ContactForm(data) f.is_valid() False So is_valid() is giving …