Skip to content

Add configurable path property to ValidationBuilder#244

Draft
dhoepelman wants to merge 2 commits into
mainfrom
dhoepelman/configurable-path
Draft

Add configurable path property to ValidationBuilder#244
dhoepelman wants to merge 2 commits into
mainfrom
dhoepelman/configurable-path

Conversation

@dhoepelman
Copy link
Copy Markdown
Collaborator

@dhoepelman dhoepelman commented Nov 8, 2025

Summary

  • Adds path property to ValidationBuilder to override default path generation
  • Enables transparent inline/value class handling where wrapper shouldn't appear in error paths
  • All validation methods (validate, ifPresent, required, onEach) respect the custom path

Closes #198

Test plan

  • Added ConfigurablePathTest with 6 test cases covering all major scenarios
  • All existing tests pass

🤖 Generated with Claude Code

Adds a public `path` property to ValidationBuilder that allows overriding
the default path used for sub-validations and constraints. This is useful
for inline/value classes where the wrapper should be transparent in error
paths, or other scenarios where the default path doesn't match the
serialized structure.

When set, this path replaces the default path that would normally be
generated from property/function references.

Fixes #198

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@dhoepelman dhoepelman marked this pull request as draft November 8, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant path segment

1 participant