Make validation mapping generic