In which file or form should validation code be written ?
-
3Since you are new here I won't downvote. Next time write your problem with more details about what you need. Also get rid of the multiple question marks.the_drow– the_drow2009-06-23 09:45:41 +00:00Commented Jun 23, 2009 at 9:45
-
1Cleaned up, but I can't add the missing info.MSalters– MSalters2009-06-23 10:00:34 +00:00Commented Jun 23, 2009 at 10:00
Add a comment
|
4 Answers
In the file where you define the form class.
You might want to read the documentation on form validation. There's a decent example on that page of validation on a form as a whole and on individual components of forms.
Comments
form validation , batter to define in models.py
so at first you have to define a function then you can use this link for more information