add robust validator middleware