test validation middleware