Added option for minLength