Validation middleware for express and connect apps