Controls whether a field is required, and what it falls back to when absent. A field is either required: true (no default allowed), has an explicit default, or is optional with no default (resolves to undefined when absent).
required: true
default
undefined
Controls whether a field is required, and what it falls back to when absent. A field is either
required: true(no default allowed), has an explicitdefault, or is optional with no default (resolves toundefinedwhen absent).