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