added optional length requirement (if entered, length has to be >2 <51)