From c180d75a830abc4ab9dbaaa4ec157569a11c4f2c Mon Sep 17 00:00:00 2001 From: dro-sh Date: Tue, 14 Jun 2022 21:52:18 +0300 Subject: [PATCH] pass locale to getGetErrors to get correct messages --- src/lib/useFormValidationSlice.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/useFormValidationSlice.tsx b/src/lib/useFormValidationSlice.tsx index 09a6a777..58e60ee1 100644 --- a/src/lib/useFormValidationSlice.tsx +++ b/src/lib/useFormValidationSlice.tsx @@ -313,6 +313,9 @@ export function useFormValidationSlice(params: { }; passwordRequired: boolean; realm: { registrationEmailAsUsername: boolean }; + locale?: { + currentLanguageTag: KcLanguageTag; + }; }; /** NOTE: Try to avoid passing a new ref every render for better performances. */ passwordValidators?: Validators; @@ -382,6 +385,7 @@ export function useFormValidationSlice(params: { "profile": { "attributes": attributesWithPassword, }, + "locale": kcContext.locale, }, });