Implemented maxLength and minLength.