In which file or form should validation code be written ?
+5
A:
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.
Dominic Rodger
2009-06-23 09:30:58
thanks Dominic ..........
2009-06-23 09:55:54
A:
Form validation in django is a done by methods on the form class.
Django does not impose any conditions on where forms have to be defined.
They are, often defined, by convention, in a file called forms.py
Lakshman Prasad
2009-06-23 16:01:49
A:
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
nazmul hasan
2009-06-24 09:32:16