> But can i do something similar in the Model itself ?
Hi,
have you checked the documentation?
http://docs.djangoproject.com/en/dev/ref/models/instances/#validating-objects
Cheers
Jirka
--
You received this message because you are subscribed to the Google Groups
"Django users"
Hello,
I try to validate a single field in a model.
I know I can validate the field in a ModelForm like:
def clean_FIELDNAME(self):
if self == 'This is a test':
raise forms.ValidationError("ValidationError")
But can i do something similar in the Model itself ?
--
You received this
2 matches
Mail list logo