How to use the @inkline/inkline/src/validators/alphanumeric.alphanumeric function in @inkline/inkline

To help you get started, we’ve selected a few @inkline/inkline 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 inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true for letters and numbers', () => {
            expect(alphanumeric('abc123')).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true if all array entries are alphanumeric', () => {
            expect(alphanumeric(['abc', 'ABC', 'abc123'])).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true for letters, numbers and dashes if options.allowDash enabled', () => {
            expect(alphanumeric('abc-ABC123', { allowDashes: true })).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true for lowercase letters', () => {
            expect(alphanumeric('abc')).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return false for letters and symbols', () => {
            expect(alphanumeric('abc!')).toEqual(false);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true for lowercase and uppercase letters', () => {
            expect(alphanumeric('abcABC')).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true for uppercase letters', () => {
            expect(alphanumeric('ABC')).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / alphanumeric.spec.js View on Github external
it('should return true for letters, numbers and spaces if options.allowSpace enabled', () => {
            expect(alphanumeric('abc ABC123', { allowSpaces: true })).toEqual(true);
        });