sa-company-registration-number-regex
Version:
Regular expression for matching South African Company Registration Number
14 lines (10 loc) • 403 B
JavaScript
const saCompanyRegistration = require('./index')
test('should be defined', () => {
expect(saCompanyRegistration).toBeDefined()
})
test('should match SA cellphone number', () => {
expect(saCompanyRegistration({ exact: true }).test('2001/012511/07')).toBeTruthy()
})
test('should not match invalid numbers', () => {
expect(saCompanyRegistration({ exact: true }).test('foobarbaz')).toBeFalsy()
})