Object to inspect; null or undefined counts every field as missing.
Names that must be present.
See ValidatorOptions.
{ valid, error, missing }, where missing lists the absent names.
const config = { map: { target: "my-map" } };
const result = GeoLeaf.Validators.validateRequiredFields(config, ["map", "layers"]);
// Returns: { valid: false, error: 'Missing required fields: layers', missing: ['layers'] }
const result2 = GeoLeaf.Validators.validateRequiredFields(config, ["map"]);
// Returns: { valid: true, error: null, missing: [] }
Checks that an object carries a set of required top-level fields.
Reports every missing field at once through the extra
missingarray, rather than stopping at the first — a configuration error is more useful complete.