Skip to content

Commit

Permalink
fix(textarea): counter validation
Browse files Browse the repository at this point in the history
  • Loading branch information
iacopolea committed Sep 7, 2023
1 parent f3367d3 commit 4900005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stories/form/textareaField/TextareaField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const TextareaField = ({
{counterMax && (
<Counter
isFocus={isFocus}
isInvalid={meta.touched && typeof meta.error == "string"}
isInvalid={field.value?.length > counterMax}
>
<span>{field.value?.length || 0}</span>/{counterMax}
</Counter>
Expand Down

0 comments on commit 4900005

Please sign in to comment.