Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Latest commit

 

History

History
20 lines (15 loc) · 476 Bytes

key-nested.md

File metadata and controls

20 lines (15 loc) · 476 Bytes

Key Nested

Validates property using . to represent nested data.

Valid values:

validator.keyNested('foo.bar').validate({foo: {bar: 'foobar'}});
validator.keyNested('foo.bar').validate(
    new Map<string, Map<string, string>>([['foo', new Map<string, string>([['bar', 'foobar']])]])
);

Invalid values:

validator.keyNested('foo.bar').validate({foo: {baz: 'bar'}});
validator.keyNested('foo.*').validate({});
validator.keyNested('bar').validate([]);