Allow validation_function to be more dynamic, such as accepting a schema
object, etc.