How to validate in Strapi (typescript) before creating one content that combined key is unique?

Hi all,
I have posted a question in stack overflow about validation of combined unique key for a particular locale.

As I am not getting answers there am reposting here

Looking forward to learn the best approach for this use-case, especially considering this is a very frequently needed use case! - a combined unique key for a particular locale

I solved the issue with the result I wanted.

I shared the answer to my stack question above:

I do only hope that this solution will work also on newer strapi versions :wink: and the typescript support of strapi improves for the backend development as I mentioned in stack.