MCPcopy
hub / github.com/Automattic/mongoose / String

Class String

types/schematypes.d.ts:620–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618 }
619
620 class String extends SchemaType {
621 /** This schema type's name, to defend against minifiers that mangle function names. */
622 static schemaName: 'String';
623 readonly schemaName: 'String';
624
625 /** Adds an enum validator */
626 enum(vals: string[] | any): this;
627
628 /** Adds a lowercase [setter](http://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-set). */
629 lowercase(shouldApply?: boolean): this;
630
631 /** Sets a regexp validator. */
632 match(value: RegExp, message: string): this;
633
634 /** Sets a maximum length validator. */
635 maxlength(value: number, message: string): this;
636
637 /** Sets a minimum length validator. */
638 minlength(value: number, message: string): this;
639
640 /** Adds a trim [setter](http://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-set). */
641 trim(shouldTrim?: boolean): this;
642
643 /** Adds an uppercase [setter](http://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-set). */
644 uppercase(shouldApply?: boolean): this;
645
646 /** Default options for this SchemaType */
647 static defaultOptions: Record<string, any>;
648 }
649
650 class Union extends SchemaType {
651 static schemaName: 'Union';

Callers 15

_assignFunction · 0.85
mongoose.jsFile · 0.85
document.jsFile · 0.85
handleAccumulatorFunction · 0.85
number.jsFile · 0.85
decimal128.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…