On 14 Oct 02:34, danin wrote:
> 
> hi guys,
>     I am new to Django (started 2 weeks back). right now i am
> designing one application having model-
>  class info(models.Model):
>        name=models.CharField(max_length=100)
>        dob=models.DateField()
>        dod=models.DateField()
>        address=models.CharField(max_length=250)
>        pin=IntegerField(msx_length=10)
> 
> I am entering data in database via admin CRUD. but while entering the
> data i want to perform some validations like :
>   1. No negative number in pin field.
>   2. dob<dod
> 
> can anyone please guide me in this. i am not able to fiure out where
> to performed this validation and how.

I think the document you're looking for is:
    
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin

If you read all of that page, then I'm sure the custom validation will
make sense.

Thanks,
-- 
Brett Parker

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to