Validate and parse Philippine SEC registration numbers in JavaScript/TypeScript and PHP — recognizes the CS / CN / A / FS / FN / PG prefix + year + sequence formats and labels the entity type. Part of the @ph-dev-utils family.
ph-business/
├── packages/
│ ├── js/ # @ph-dev-utils/business (npm)
│ └── php/ # phdevutils/business (Composer)
Format-level only. This checks the structure of a registration number and infers the entity type from the prefix. It is not a registry lookup — always confirm a company against the SEC verification portal.
A SEC company/partnership registration number encodes the registering entity's type (via prefix), the year, and a sequence — e.g. CS2019-12345. This package recognizes the documented prefixes and the prefix + 4-digit year + 3–8 digit sequence structure, then exposes the parsed parts and a best-effort entity-type label.
| Prefix | Entity type | Era |
|---|---|---|
CS |
Stock or non-stock corporation (unified) | 2013–present |
CN |
Non-stock corporation (legacy) | 1986–2012 |
A |
Stock corporation (legacy) | pre-2000 |
FS |
Foreign stock corporation / branch | 2000–present |
FN |
Foreign non-stock corporation | 2000–present |
PG |
Partnership | 2017–present |
JS / TS — npm install @ph-dev-utils/business
import { validateSEC, parseSEC, formatSEC } from '@ph-dev-utils/business';
validateSEC('CS2019-12345'); // true
parseSEC('CS2019-12345')?.year; // 2019
formatSEC('cs 2019 12345'); // 'CS2019-12345'PHP — composer require phdevutils/business
use PhDevUtils\Business\Sec;
Sec::validate('CS2019-12345'); // true
Sec::parse('CS2019-12345')['year']; // 2019
Sec::format('cs 2019 12345'); // 'CS2019-12345'See the per-package READMEs (JS · PHP) for the full API.
- Structural recognition, not a registry check. A
truefromvalidateSECmeans the string looks like a SEC registration number — it does not confirm the company exists. Verify against the SEC. - Entity-type labels are indicative. SEC prefixes and their meanings have shifted across eras and public sources don't fully agree on every legacy prefix; labels reflect a best-effort reading of public SEC guidance.
- Purely numeric legacy certificates (no prefix) are out of scope — they can't be told apart from arbitrary numbers structurally.
To tag a company's industry, pair this with @ph-dev-utils/psic (Philippine Standard Industrial Classification). Not affiliated with the Philippine SEC.
MIT.