Skip to content

Commit

Permalink
Fix invite limit required
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Dec 23, 2024
1 parent 0ca3703 commit 8351a69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ export const bioSchema = object({

export const inviteSchema = object({
gift: intValidator.positive('must be greater than 0').required('required'),
limit: intValidator.positive('must be positive'),
limit: intValidator.positive('must be positive').nullable(),
description: string().trim().max(40, 'must be at most 40 characters'),
id: string().matches(/^[\w-_]+$/, 'only letters, numbers, underscores, and hyphens').min(8, 'must be at least 8 characters').max(32, 'must be at most 32 characters')
})
Expand Down
2 changes: 1 addition & 1 deletion pages/invites/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function InviteForm () {
variables: {
id: id || undefined,
gift: Number(gift),
limit: limit ? Number(limit) : limit,
limit: limit ? Number(limit) : null,
description: description || undefined
}
})
Expand Down

0 comments on commit 8351a69

Please sign in to comment.