# Decorator Lowercase

Decorator mongoose property
Module
import { Lowercase } from "@tsed/mongoose"
Source/packages/mongoose/src/decorators/lowercase.ts

# Overview

function Lowercase(lowercase?: boolean): PropertyDecorator;

# Description

If truthy, Mongoose will add a custom setter that lowercases this string using JavaScript's built-in String#toLowerCase().

# Example

@Model()
export class EventModel {
  @Lowercase()
  field: string;
}
1
2
3
4
5

Other topics