# Decorator Uppercase

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

# Overview

function Uppercase(uppercase?: boolean): PropertyDecorator;

# Description

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

# Example

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

Other topics