Object Descriptors & Property Flags

What pattern does this function implement?
function createValidatedProperty(obj, propName, validator) {
  let value;
  
  Object.defineProperty(obj, propName, {
    get() {
      return value;
    },
    set(newValue) {
      if (!validator(newValue)) {
        throw new Error(`Invalid value for ${propName}`);
      }
      value = newValue;
    },
    enumerable: true,
    configurable: false
  });
};
Next Question (35/40)