Skip to content

Commit f558f82

Browse files
committed
[#98] ✨ Add rules to Tag
1 parent 19c10e4 commit f558f82

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/shared/form/Form.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,20 @@ const Radio = ({
196196
)
197197
}
198198

199-
const Tag = ({ name, ...props }: TagInputProps): JSX.Element => {
199+
const Tag = ({
200+
name,
201+
rules,
202+
...props
203+
}: {
204+
name: string
205+
rules?: Record<string, unknown>
206+
} & TagInputProps): JSX.Element => {
200207
const { control } = useFormContext()
201208
return (
202209
<Controller
203210
name={name}
204211
control={control}
212+
rules={rules}
205213
render={() => <TagInput name={name} {...props} />}
206214
/>
207215
)

0 commit comments

Comments
 (0)