diff --git a/README.md b/README.md index 5e502db93..6a82be93e 100644 --- a/README.md +++ b/README.md @@ -330,7 +330,7 @@ There are two modes of format validation: `fast` and `full`. This mode affects f You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. -The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allowlist specific format(s) to be ignored. See [Options](#options) for details. You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js). diff --git a/spec/extras/$data/format.json b/spec/extras/$data/format.json index 22cac2ddc..b223fb92b 100644 --- a/spec/extras/$data/format.json +++ b/spec/extras/$data/format.json @@ -49,7 +49,7 @@ "valid": false }, { - "description": "whitelisted unknown format is valid", + "description": "allowlisted unknown format is valid", "data": { "str": "any value", "strFormat": "allowedUnknown" @@ -57,7 +57,7 @@ "valid": true }, { - "description": "not whitelisted unknown format is invalid", + "description": "not allowlisted unknown format is invalid", "data": { "str": "any value", "strFormat": "completelyUnknown" diff --git a/spec/options/unknownFormats.spec.js b/spec/options/unknownFormats.spec.js index 81ea32655..018575140 100644 --- a/spec/options/unknownFormats.spec.js +++ b/spec/options/unknownFormats.spec.js @@ -70,7 +70,7 @@ describe('unknownFormats option', function() { }); describe('= [String]', function() { - it('should pass schema compilation and be valid if whitelisted unknown format is used', function() { + it('should pass schema compilation and be valid if alloylisted unknown format is used', function() { test(new Ajv({unknownFormats: ['allowed']})); function test(ajv) { @@ -83,7 +83,7 @@ describe('unknownFormats option', function() { } }); - it('should be valid if whitelisted unknown format is used via $data', function() { + it('should be valid if alloylisted unknown format is used via $data', function() { test(new Ajv({$data: true, unknownFormats: ['allowed']})); function test(ajv) { diff --git a/spec/tests/rules/format.json b/spec/tests/rules/format.json index c316a6ee5..c7d2b07f0 100644 --- a/spec/tests/rules/format.json +++ b/spec/tests/rules/format.json @@ -1,6 +1,6 @@ [ { - "description": "whitelisted unknown format is valid", + "description": "alloylisted unknown format is valid", "schema": { "format": "allowedUnknown" },