﻿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
24939	min_length not working for charField	Brandon Osborn	nobody	"This code:
{{{
class SignUp(models.Model):
	email = models.EmailField()
	first_name = models.CharField(max_length=50, blank=False,   null=False)
	last_name = models.CharField(max_length=50, blank=False, null=False)
	timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
	updated = models.DateTimeField(auto_now_add=False, auto_now=True)

	def __str__(self):
		return self.email

}}}
Works fine, but if I change one of the Charfields to:
{{{
        last_name = models.CharField(min_length=2, max_length=50, blank=False, null=False)
}}}
or
{{{
        last_name = models.CharField(max_length=50, min_length=2, blank=False, null=False)
}}}
or
{{{
        last_name = models.CharField(min_length=2, blank=False, null=False)
}}}
the server aborts, with the following error, which refers to the models.py file:

{{{
TypeError:  __init()__ got an unexpected keyword argument 'min_length'
}}}
The charField documentation at:
[https://docs.djangoproject.com/en/1.8/ref/forms/fields/#charfield]
States:
'''Validates max_length or min_length, if they are provided. Otherwise, all inputs are valid'''
"	Uncategorized	closed	Forms	1.8	Normal	invalid	charField, min_length		Unreviewed	0	0	0	0	0	1
