diff --git a/frontend/src/hooks/petProfile/usePetProfileEdition.ts b/frontend/src/hooks/petProfile/usePetProfileEdition.ts index d73fde891..5f46fd614 100644 --- a/frontend/src/hooks/petProfile/usePetProfileEdition.ts +++ b/frontend/src/hooks/petProfile/usePetProfileEdition.ts @@ -38,8 +38,7 @@ export const usePetProfileEdition = () => { return { ...prev, name: petName }; }); - if (isValidName(petName)) setIsValidNameInput(true); - if (!isValidName(petName)) setIsValidNameInput(false); + setIsValidNameInput(isValidName(petName)); }; const onChangeAge = (e: ChangeEvent) => {