Added min and maxlength validation (bug in angular)