new Formatter(document.getElementById('credit-input'), { 'pattern': '{{9999}}-{{9999}}-{{9999}}-{{9999}}' }); $('#credit-input').formatter({ 'pattern': '{{9999}}-{{9999}}-{{9999}}-{{9999}}' }); Phone Number Ex: (802) 415-3411 new Formatter(document.getElementById('phone-input'), { 'pattern': '({{999}}) {{999}}.{{9999}}', 'persistent': true }); $('#phone-input').formatter({ 'pattern': '({{999}}) {{