Add Trait support for validator