﻿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
14347	Add required_if field to model fields	hejsan	nobody	"I propose to add a required_if field to model fields (and form fields also i guess?)
It should take a callable that returns either True or False.

Another option would be to allow the required field to accept a callable.

Uses:
Very often we have a ""Published"" field on our models (or ""Published date"" or ""Published status"" etc..) It would be very nice to be able to allow people to save instances without all the required fields being filled in IF the article or whathaveyou is not published yet.

Currently to do this you have to make all the fields not required and then override the save method. This would be a very handy feature for a very common problem.

Caveat: This means that the field should not be declared as ""NOT NULL"" in the database, but I don't really see that as a problem if validation is performed by django anyway."		closed	Database layer (models, ORM)			wontfix		hr.bjarni+django@…	Unreviewed	0	0	0	0	0	0
