Merge pull request #119 from dro-sh/fix-locale-on-useFormValidationSlice

pass locale to getGetErrors to get correct messages
This commit is contained in:
Joseph Garrone
2022-06-14 23:04:28 +02:00
committed by GitHub

View File

@ -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,
},
});