Skip to content

validateOid

validateOid(oid): void

Defined in: packages/format-oid/src/oid.ts:79

Validates an OID value against X.660 §7.1 and X.680 §32.3 structural rules:

  • At least two arc components.
  • All components are non-negative integers.
  • First arc is 0 (itu-t), 1 (iso), or 2 (joint-iso-itu-t).
  • Second arc is 0..39 when first arc is 0 or 1. (For first arc 2 / joint-iso-itu-t, no upper bound applies.)

ObjectIdentifier

void

If any rule is violated.

X.660 §7.1 — Arc identification rules

X.680 §32.3 — Object identifier value notation