Skip to content

Commit adf2f31

Browse files
fix: useField incorrect initialization of errorMessage on update (#7756)
1 parent beadc01 commit adf2f31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ui/src/forms/useField/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const useField = <T,>(options: Options): FieldType<T> => {
156156
valueToValidate = getDataByPath(path)
157157
}
158158

159-
let errorMessage: string | undefined
159+
let errorMessage: string | undefined = prevErrorMessage.current
160160
let valid: boolean | string = prevValid.current
161161

162162
const isValid =

0 commit comments

Comments
 (0)