Templating select2 examples Example: select2 restric 5 selection $("#tags").select2({ maximumSelectionLength: 3 });