This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


While working on the EuroPython 2014 website we ran into a situation where we had a field validator that was rather expensive to evaluate.

Sadly, the validators-attribute on a model/form field is always evaluated as a whole (meaning each validator in that list is executed no matter if a previous one errored out already). So, we wanted to have a way to mark certain validators as not to be executed in case the field was being marked as invalid anyway.

We still wanted to use the field validator API simply because it keeps everything easily testible, though.

How to use

from django.db import models

from validatorchain import ValidatorChain

from .validators import a_cheap_validator
from .validators import another_cheap_validator
from .validators import an_expensive_validator

class SomeModel(models.Model):
    field = models.CharField(
            .add(an_expensive_validator, skip_on_error=True)

This way an_expensive_validator will not be executed if a_cheap_validator already raised an exception, while another_cheap_validator will be executed again.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-validatorchain-0.1.tar.gz (2.0 kB) Copy SHA256 Checksum SHA256 Source Feb 9, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting