Optional
options: AnyObjectOptional
Optional
instance: stringOptional
The class that Mongoose uses internally to instantiate this SchemaType's options
property.
Optional
defaultDefault options for this SchemaType
String representation of what type this is, like 'ObjectID' or 'Number'
Optional
isTrue if this SchemaType has a required validator. False otherwise.
The options this SchemaType was instantiated with
The path to this SchemaType in a Schema.
The schema this SchemaType instance is part of
The validators that Mongoose should run to validate properties at this SchemaType's path.
Adds a getter to this schematype.
Defines this path as immutable. Mongoose prevents you from changing
immutable paths unless the parent document has isNew: true
.
Declares the index options for this schematype.
Set the model that this path refers to. This is the option that populate looks at to determine the foreign collection it should query.
Adds a required validator to this SchemaType. The validator gets added to the front of this SchemaType's validators array using unshift().
Optional
message: stringOptional
Sets default select() behavior for this path.
Adds a setter to this schematype.
Declares a sparse index.
Declares a full text index.
Defines a custom function for transforming this path when converting a document to JSON.
Declares an unique index.
Adds validator(s) for this document path.
Optional
errorMsg: stringOptional
Optional
type: stringOptional
Static
castStatic
checkStatic
getStatic
setGenerated using TypeDoc
SchemaType constructor