For one of my new projects, that is precisely what I am doing - making it possible to define complicated validation rules in a simple manner (and lots more). Would there be interest if we open-source it?
Though I'm not sure how much this could be generalised since complex validation rules are effectively computer programs in themselves.
Not sure what your approach to this problem is, but perhaps one way to do it would be a validation engine that is inherently functional by design.
Of course, ideally it should be something that can plug in to popular web frameworks easily.
It could be used in the same way as templating for javascript is used, a script element with a custom type or validation-src attribute in the form or something.