diff --git a/src/molecules/Input/helper.ts b/src/molecules/Input/helper.ts index 29a4930..1f9bfb7 100644 --- a/src/molecules/Input/helper.ts +++ b/src/molecules/Input/helper.ts @@ -8,6 +8,6 @@ * /> */ export const countWordsStrategy = (value: string): number => { - const words = value.split(' '); + const words = value.trim().split(/\s+/).filter(Boolean); return words.length; };