MCPcopy Create free account
hub / github.com/json-editor/json-editor / validatePatternProperties

Function validatePatternProperties

docs/scripts/ajv-validator.js:5219–5232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5217 const { props } = it;
5218 validatePatternProperties();
5219 function validatePatternProperties() {
5220 for (const pat of patterns) {
5221 if (checkProperties)
5222 checkMatchingProperties(pat);
5223 if (it.allErrors) {
5224 validateProperties(pat);
5225 }
5226 else {
5227 gen.var(valid, true); // TODO var
5228 validateProperties(pat);
5229 gen.if(valid);
5230 }
5231 }
5232 }
5233 function checkMatchingProperties(pat) {
5234 for (const prop in checkProperties) {
5235 if (new RegExp(pat).test(prop)) {

Callers 1

codeFunction · 0.85

Calls 4

checkMatchingPropertiesFunction · 0.85
validatePropertiesFunction · 0.85
varMethod · 0.80
ifMethod · 0.45

Tested by

no test coverage detected