How to use restricted-input - 2 common examples

To help you get started, we’ve selected a few restricted-input examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github braintree / braintree-web / test / hosted-fields / unit / internal / components / postal-code-input.js View on Github external
it('sets the pattern to a 10-character pattern with default maxLength', function () {
      this.sandbox.spy(RestrictedInput.prototype, 'setPattern');

      helpers.createInput('postalCode');

      expect(RestrictedInput.prototype.setPattern).to.be.calledWith('{{**********}}');
    });
github braintree / braintree-web / test / hosted-fields / unit / internal / components / postal-code-input.js View on Github external
it('sets the pattern to a 10-character pattern with default maxLength', function () {
      this.sandbox.spy(RestrictedInput.prototype, 'setPattern');

      helpers.createInput('postalCode');

      expect(RestrictedInput.prototype.setPattern).to.be.calledWith('{{**********}}');
    });

restricted-input

Restrict inputs to certain valid characters (e.g. formatting phone or card numbers)

MIT
Latest version published 8 days ago

Package Health Score

83 / 100
Full package analysis

Popular restricted-input functions