Fixed validation MaxLength and MinLength method.