VGS Collect.js examples

VGS Collect.js is a javascript library that allows you to integrate secure fields with non-secure fields in your page.
The secure fields behave like traditional input fields while preventing access to the unsecured data.

Codesandbox playground
          f.field('#cc-holder', {...})
            .replacePattern('/[^a-zA-Z\s]+/g');
          
        
          f.field('#zip-code', {...})
            .replacePattern('/[^\\d]+/g');
          
        
          f.field('#phone-number', {...})
            .mask('+1 (999) 999-99-99');
          
        
          f.field('#ssn', {...})
            .mask('999-99-9999', '*');
          
        
          f.field('#birth-date', {...})
            .mask('99/99/9999', '_');
          
        
          f.field('#cc-exp-short',
            {yearLength: '2'});
          
        
          f.field('#cc-exp-full .field-space',
            {yearLength: '4'});