fix: useField incorrect initialization of errorMessage on update (#7756)

This commit is contained in:
Jarrod Flesch
2024-08-19 17:00:39 -04:00
committed by GitHub
parent beadc0158e
commit adf2f31178

View File

@@ -156,7 +156,7 @@ export const useField = <T,>(options: Options): FieldType<T> => {
valueToValidate = getDataByPath(path)
}
let errorMessage: string | undefined
let errorMessage: string | undefined = prevErrorMessage.current
let valid: boolean | string = prevValid.current
const isValid =