StringPropertyMetadata: BasePropertyMetadata & WithDefaultMetadata<string> & {
    enum: AnyEnum<string> | undefined;
    format: StringFormat | undefined;
    maxLength: number | undefined;
    minLength: number | undefined;
    primary: boolean;
    regex: string | RegExp | undefined;
    type: "string";
    unique: boolean;
}

Metadata for string properties.

Type declaration

  • enum: AnyEnum<string> | undefined

    An enum that this property is one of.

  • format: StringFormat | undefined

    The format of the property, or undefined if none.

  • maxLength: number | undefined

    The maximum length of the property, or undefined if not limited.

  • minLength: number | undefined

    The minimum length of the property, or undefined if not limited.

  • primary: boolean

    Whether or not the property is a primary key. Enabling this also turns on 'uuid' as the format and sets 'unique' to true.

  • regex: string | RegExp | undefined

    A regex to validate the property, or undefined.

  • type: "string"

    The type of the property.

  • unique: boolean

    Whether or not the property should be unique.