﻿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
30972	USERNAME_FIELD UniqueConstraint option	Iman Kermani	nobody	"I'm having a case that the User model {{{USERNAME_FIELD}}} is cellphone and at registration, cellphone should be verified with SMS OTP. Meanwhile, the User object should be created with {{{is_verified = False}}} , so in {{{Meta}}} class, I need a UniqueConstraint like the following code: 

{{{
UniqueConstraint(fields=[""cellphone""], condition=Q(is_verified=True), name=""unique_is_active_cellphone"")
}}}

Generally, I need to have the ability to create multiple users with the same username and have a unique ''Active'' or ''Verified'' in the system.
"	New feature	closed	Database layer (models, ORM)	3.0	Normal	duplicate	AbstractUser UniqueConstraint	Iman Kermani	Unreviewed	0	0	0	0	0	0
