Validation

add Express middleware for request validation, and tests for request validator logic.