Add min length attribute to javascript to allow users to have control of that

Add min length attribute to javascript to allow users to have control of that