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

Method _validateUUIDSchema

src/validator.js:835–844  ·  view source on GitHub ↗
(schema, value, path)

Source from the content-addressed store, hash-verified

833 }
834
835 _validateUUIDSchema (schema, value, path) {
836 if (!(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value))) {
837 return [{
838 path,
839 property: 'format',
840 message: this.translate('error_pattern', ['^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$'], schema)
841 }]
842 }
843 return []
844 }
845
846 _validateNumberSubSchemaMultipleDivisible (schema, value, path) {
847 const divisor = schema.multipleOf || schema.divisibleBy

Callers 1

_validateSchemaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected