'How to use react-intl with yup and react-hook-forms?

I am trying to use react-intl to create a localized validation schema with yup. However, all I could find is integration with i18n. I am using react-intl already as my main localization tool; therefore, I would like to stay with this tool. Is it possible to create a functioning localization with react-intl for yup? I am creating validation schemas in a separate files FYI.

Thanks for any tips

CodeSandbox Example of the issue

TLDR: I need to localize the validation message using. react-intl. At the moment I am not sure how to pass the localization id and get it translated in the render component.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source