Support the use of `this` in validation functions