Skip to content

Commit

Permalink
Merge pull request #125 from salpinoff/bugfix/QA-124
Browse files Browse the repository at this point in the history
🐛 fix: 몬스터 이름 생성시, 공백만 입력하는 경우 방지  #124
  • Loading branch information
dbstjrrb12 authored Sep 20, 2024
2 parents 1336885 + 3bd06bf commit f2d6880
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ function MonsterName() {
helperText="2~6자로 입력해주세요"
error={!!monsterNameError}
{...register('monsterName', {
required: true,
minLength: 2,
maxLength: 6,
validate: (value) => {
const trimmed = value.trim();
return trimmed.length >= 2 && trimmed.length <= 6;
},
})}
/>

Expand Down

0 comments on commit f2d6880

Please sign in to comment.