https://blog.magicloops.dev/posts/enhanced-validation/