Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with mongoose 5.12.5 and nestjs #67

Open
fdorantesm opened this issue Apr 22, 2021 · 0 comments
Open

Doesn't work with mongoose 5.12.5 and nestjs #67

fdorantesm opened this issue Apr 22, 2021 · 0 comments

Comments

@fdorantesm
Copy link

fdorantesm commented Apr 22, 2021

I tried using globally and sat directly in a schema:

@Prop({
    raw: {
      index: true,
      required: true,
      unique: 'Email ({VALUE}) is already registered',
      type: String,
    },
  })
  public email: string;
@Prop({
      index: true,
      required: true,
      unique: 'Email ({VALUE}) is already registered',
      type: String
  } as PropOptions<any>)
  public email: string;
[Nest] 23477   - 04/22/2021, 1:22:02 AM   [ExceptionsHandler] Validation failed +1471ms
ValidationError: Validation failed
    at /Volumes/dev/organic/dist/main.js:1975:31
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant