KeyPathPattern
KeyPathPattern =
string|KeyPath
Defined in: keyPath.ts:136
A pattern that matches key paths
Keys are separated by dots, as in a key path, and three spellings have a meaning of their own:
.matches the self path, as KeyPath.Self and an empty string do*matches exactly one key**matches any number of keys, including none, soitems.**matchesitemsitself as well
Any other key matches only a key spelled the same way, so a pattern without wildcards matches just the key path it
spells. There is no escaping: a key spelled * or ** is always a wildcard.
Example
Section titled “Example”validator.getErrorMessages("email"); // emailvalidator.getErrorMessages("items.*"); // items.0 and items.1, but neither items nor items.0.namevalidator.getErrorMessages("items.*.name"); // items.0.name and items.1.namevalidator.getErrorMessages("items.**"); // items, items.0, items.0.name, ...validator.getErrorMessages("."); // the errors of the object itselfvalidator.getErrorMessages("**"); // every error