check maxLength