Hax0r
Hax0r

Reputation: 1813

How to set not null property from typescript sequelize

Hellow, How to set not null property from typescript sequelize? They have @NotNull decorator. but did't work that. The errors are below.

Validation error: Warning \"notNull\" validation has been deprecated in favor of Schema based \"allowNull\

Be already set not null from MySql Scheme.

Upvotes: 1

Views: 3199

Answers (1)

Imrahamed
Imrahamed

Reputation: 202

You can use @AllowNull instead of using notNull. Reference: https://github.com/RobinBuschmann/sequelize-typescript#model-validation

Upvotes: 2

Related Questions