Repository navigation
v0.3.1
@cookbook/pathkit
0.3.1
Patch Changes
-
bc195cf: Fix
regexpath constraint validation to require full segment matches.Previously, the
regexconstraint validator used the provided expression directly withRegExp.test(...), which allowed partial substring matches. For example,[a-z0-9-]+incorrectly acceptedPostbecause the substringostmatched.The validator now uses the constraint's sanitized
toRegExp(...)source and anchors it as a full-segment match with^(?:...)$. This aligns runtime constraint validation with path matching behavior and prevents invalid path params from passing validation.