feat: add validation to custom claim input

This commit is contained in:
Elias Schneider
2024-10-28 18:34:25 +01:00
parent c056089c60
commit 7bfc3f43a5
4 changed files with 32 additions and 7 deletions

View File

@@ -1,8 +1,11 @@
package dto
type CustomClaimDto struct {
Key string `json:"key" binding:"required,max=20"`
Value string `json:"value" binding:"required,max=10000"`
Key string `json:"key"`
Value string `json:"value"`
}
type CustomClaimCreateDto = CustomClaimDto
type CustomClaimCreateDto struct {
Key string `json:"key" binding:"required,claimKey"`
Value string `json:"value" binding:"required"`
}