pass locale to getGetErrors to get correct messages

This commit is contained in:
dro-sh 2022-06-14 21:52:18 +03:00
parent 4a040b32c0
commit c180d75a83

View File

@ -313,6 +313,9 @@ export function useFormValidationSlice(params: {
}; };
passwordRequired: boolean; passwordRequired: boolean;
realm: { registrationEmailAsUsername: boolean }; realm: { registrationEmailAsUsername: boolean };
locale?: {
currentLanguageTag: KcLanguageTag;
};
}; };
/** NOTE: Try to avoid passing a new ref every render for better performances. */ /** NOTE: Try to avoid passing a new ref every render for better performances. */
passwordValidators?: Validators; passwordValidators?: Validators;
@ -382,6 +385,7 @@ export function useFormValidationSlice(params: {
"profile": { "profile": {
"attributes": attributesWithPassword, "attributes": attributesWithPassword,
}, },
"locale": kcContext.locale,
}, },
}); });