fix: Add additional model validation (#3725)
This commit is contained in:
@@ -11,6 +11,7 @@ import Team from "./Team";
|
||||
import User from "./User";
|
||||
import IdModel from "./base/IdModel";
|
||||
import Fix from "./decorators/Fix";
|
||||
import Length from "./validators/Length";
|
||||
|
||||
@Table({ tableName: "team_domains", modelName: "team_domain" })
|
||||
@Fix
|
||||
@@ -20,6 +21,7 @@ class TeamDomain extends IdModel {
|
||||
msg: "You chose a restricted domain, please try another.",
|
||||
})
|
||||
@NotEmpty
|
||||
@Length({ min: 0, max: 255, msg: "Must be less than 255 characters" })
|
||||
@Column
|
||||
name: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user