Function: addContractKeywords()
addContractKeywords<
T>(instance):T
Defined in: packages/contracts/src/validation.ts:92
Registers the contracts' own schema keywords on an Ajv instance. Strict mode refuses an unknown keyword, so every validator that compiles a contract schema calls this.
x-normalize: 'NFC' rewrites a string to Unicode NFC in its parent, so what is
validated is what is stored. It runs before the length and pattern checks, which
therefore judge the normalised form. A root-level string has no parent to rewrite.
Type Parameters
T
T extends Ajv
Parameters
instance
T
An Ajv instance, of any draft.
Returns
T
The same instance.