Configures express-validator.
Added validation logic and validation error response.
Added logic to display error messages received via JSON.