File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ const AddFolderModal = ({ folderName }: { folderName: string }) => {
1313 const { closeModal } = useModalStore ( ) ;
1414
1515 const handleChange = ( e : ChangeEvent < HTMLInputElement > ) => {
16- setValue ( e . target . value ) ;
16+ const newValue = e . target . value ;
17+ if ( newValue . length > 5 ) {
18+ toast . error ( toastMessages . error . limitFolderNameLength ) ;
19+ } else {
20+ setValue ( newValue ) ;
21+ }
1722 } ;
1823 const handleSubmit = async ( ) => {
1924 const body = {
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const toastMessages = {
2525 SNSshare : "공유에 실패했습니다" ,
2626 inputLink : "링크를 입력해주세요" ,
2727 inputFolderName : "폴더 이름을 입력해주세요" ,
28+ limitFolderNameLength : "6자 이하로 입력해주세요" ,
2829 selectFolder : "폴더를 선택해주세요" ,
2930 sameLink : "이미 저장된 링크 주소입니다" ,
3031 sameFolderName : "같은 이름으로는 수정할 수 없습니다" ,
You can’t perform that action at this time.
0 commit comments