We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30c335b commit d94e667Copy full SHA for d94e667
src/form/hooks/useField.ts
@@ -29,7 +29,7 @@ export const useField = (name: string, onProgrammaticValue?: (serializedValue: a
29
const [isTouched, setIsTouched] = useState<boolean>(false);
30
const watchResult = useWatch({ name: name });
31
32
- if (name && name.split('.').filter((p) => /\d+/.test(p)).length > 0) {
+ if (name && name.split('.').filter((p) => /^\d+$/.test(p)).length > 0) {
33
console.error(
34
`Field name "${name}" cannot include a numeric part. Try to prefix the numeric part with some string.`
35
);
0 commit comments