Metadata-Version: 1.1
Name: django-xvalidate
Version: 0.3.0
Summary: Cross-field validators within a Django model
Home-page: https://www.github.com/suriya/django-xvalidate
Author: Suriya Subramanian
Author-email: suriya@alumni.cs.utexas.edu
License: MIT License
Description: 
        ================
        django-xvalidate
        ================
        
        .. image:: https://travis-ci.org/suriya/django-xvalidate.svg?branch=master
            :target: https://travis-ci.org/suriya/django-xvalidate
        .. image:: https://coveralls.io/repos/suriya/django-xvalidate/badge.svg?branch=master&service=github
          :target: https://coveralls.io/github/suriya/django-xvalidate?branch=master
        .. image:: https://img.shields.io/pypi/v/django-xvalidate.svg
            :target: https://pypi.python.org/pypi/django-xvalidate
            :alt: Latest PyPI version
        
        django-xvalidate allows you to declare cross-field validators within a
        Django model.
        
        As an example, consider a Django model named :code:`Event`.
        
        .. code:: python
        
          from django.db import models
        
          class Event(models.Model):
              title = models.CharField(max_length=255)
              start_date = models.DateField()
              end_date = models.DateField()
        
        django-xvalidate allows you to declare that the start date precedes the end
        date as follows:
        
        .. code:: python
        
          from django.db import models
          from xvalidate import XValidatedModel, XLe
        
          class Event(XValidatedModel, models.Model):
              title = models.CharField(max_length=255)
              start_date = models.DateField()
              end_date = models.DateField()
        
              class XVMeta(XValidatedModel.XVMeta):
                  spec = [
                      XLe('start_date', 'end_date',
                          message='The start date should precede the end date')
                  ]
        
        :code:`XValidatedModel` ensures that this specification is maintained
        invoking :code:`Event.clean()` and raises :code:`ValidationError` as
        appropriate.
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
