Skip to content

Commit

Permalink
fix: draft title validation (#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyesp committed Sep 27, 2023
1 parent 914ca00 commit 613dd39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/entities/Proposal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const newProposalDraftScheme = {
},
title: {
type: 'string',
minLength: 1,
minLength: 5,
maxLength: 80,
},
summary: {
Expand Down Expand Up @@ -341,7 +341,7 @@ export const newProposalGovernanceScheme = {
},
title: {
type: 'string',
minLength: 1,
minLength: 5,
maxLength: 80,
},
summary: {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/submit/draft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export default function SubmitDraftProposal() {
name="title"
rules={{
required: { value: true, message: t('error.draft.title_empty') },
min: { value: schema.title.minLength, message: t('error.draft.title_too_short') },
max: { value: schema.title.maxLength, message: t('error.draft.title_too_long') },
minLength: { value: schema.title.minLength, message: t('error.draft.title_too_short') },
maxLength: { value: schema.title.maxLength, message: t('error.draft.title_too_large') },
}}
error={!!errors.title}
loading={isLoadingVpDistribution}
Expand Down

0 comments on commit 613dd39

Please sign in to comment.