Allow using closures as validators