remix-validated-form 5.1.6 → 5.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -163,6 +163,8 @@ function _setPathNormalized(object, path, value) {
163
163
  }
164
164
  obj = obj[segment];
165
165
  }
166
+ if (typeof lastSegment === "string" && REJECT_KEYS.includes(lastSegment))
167
+ throw new Error(`Attempted to set a forbidden key: ${lastSegment}`);
166
168
  obj[lastSegment] = value;
167
169
  return object;
168
170
  }