Add minLength and maxLength rules in valid object