isSchemaRequired()function

isSchemaRequired(schema: Schema): boolean
ParamType
schemaSchema
The schema to test. required
Return
boolean
true if the schema is required, false if it is optional or nullable.

Whether a schema is required, i.e. not wrapped in an OptionalSchema or NullableSchema.

Examples

isSchemaRequired(STRING) // true