Implemented working $validator implementation for types