feat: improve share security
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Type } from "class-transformer";
|
||||
import { IsString, Matches, ValidateNested } from "class-validator";
|
||||
import { IsString, Length, Matches, ValidateNested } from "class-validator";
|
||||
import { ShareSecurityDTO } from "./shareSecurity.dto";
|
||||
|
||||
export class CreateShareDTO {
|
||||
@@ -7,6 +7,7 @@ export class CreateShareDTO {
|
||||
@Matches("^[a-zA-Z0-9_-]*$", undefined, {
|
||||
message: "ID only can contain letters, numbers, underscores and hyphens",
|
||||
})
|
||||
@Length(3, 50)
|
||||
id: string;
|
||||
|
||||
@IsString()
|
||||
|
||||
Reference in New Issue
Block a user