adding a keystone validation middleware