Change MinLength and MaxLength to  Length. (The MinLength constraint and MaxLength constraint are deprecated since version 2.1 and will be removed in Symfony 2.3.)