Enhancement enable function validation

It can be desirable to validate function inputs too when the function does not belong to an object; or for that matter when the function is not an instance function of an object (e.g. static and class methods) as well.

Previous behaviour enforced that only instance member functions of an object could be validated.
If this is really required for some non-stoplight internal functionality, then shouldn't it be in a Rule instead?
Even if it was limited to classes, what about validating classmethods or staticmethods?

I think the better case is to just validate functions in general since in python all functions really just functions; object structure is just a convenience for developers.