﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2815	problem with custom validator and boolean fields	simondav@…	Adrian Holovaty	"I have model with a boolean field, and a custom validator is defined in the validator_list parameter.

he validator has to run
whenever the form is submitted, whether the checkbox is ticked or not.
I have set the 'always_test' parameter to true for the validator, but
the validator still only gets called when the box is ticked.  I have
found that the 'always_test' parameter works fine for other types of
field, it just appears to be a problem with booleanfields.   Relevant
sections of the model are pasted below:

class Order(models.Model):

        def stor_all(field_data, new_data):
               ..validator code goes here
        stor_all.always_test = True

       storage_all = models.BooleanField('All to be delivered to
storage?', null='true', validator_list = [stor_all]) "	defect	closed	Validators	0.95	normal	invalid			Unreviewed	0	0	0	0	0	0
