Fixed bug where minlength attribute is not a valid attribute, used pattern attribute instead