validate plugin: Make use of metaclasses compatible on python 2.x & 3.x