Custom validators

I am looking to solve the same issue using Strapi 4.2.x.
Are there any solutions for this issue using Strapi 4.2 and above?