Skip to content

feat: extend core validation library#29

Open
RJSonnenberg wants to merge 10 commits intomainfrom
core-validation-validators
Open

feat: extend core validation library#29
RJSonnenberg wants to merge 10 commits intomainfrom
core-validation-validators

Conversation

@RJSonnenberg
Copy link
Contributor

Summary

  • Add validator modules for core/required/string/numeric/collection/temporal/proof.
  • Re-export validator helpers through the default module.
  • Add new Proof combinators and VCtx validation operations/fixes.
  • Expand core test coverage and update root documentation.

Scope

  • Core library only.
  • Sample changes intentionally excluded.

@RJSonnenberg RJSonnenberg force-pushed the core-validation-validators branch 3 times, most recently from 27b842d to 2894c6b Compare March 2, 2026 17:15
RJSonnenberg added a commit that referenced this pull request Mar 2, 2026
Remove general documentation improvements that don't belong in feature PR:
- Removed Quick Start section (~100 lines)
- Removed FAQ / Common Patterns section (~600 lines)
- Removed Advanced Patterns section (~500 lines)
- Removed detailed examples from existing validation helpers (~400 lines)

Retained documentation for new features added in this PR:
- New validators: matchesRegex, containsAny, containsAll, startsWith, endsWith, isAlphanumeric, isAlpha, isNumeric, inRange, inRangeExclusive, isPositive, isNegative, isNonZero, isDistinct, collection validators, temporal validators
- New Proof combinators: sequence, traverse, bind, apply, choose
- New operations: refuteWithValidation, refuteEachWithValidation

These general documentation improvements will be submitted as a separate PR.
RJSonnenberg added a commit that referenced this pull request Mar 2, 2026
Add comprehensive documentation sections:
- Quick Start: Minimal email validation example with key concepts
- FAQ / Common Patterns: Guidance on refute vs dispute, failure composition, nested collections, mapInvalid usage, and async validation
- Advanced Patterns: Detailed patterns for complex validation scenarios including:
  * Failure type composition across domains
  * Conditional field validation
  * Validating nested collections with indices
  * Using flattenProofs for nested validations
  * Cross-field validation
  * Smart constructors for validated types
  * Error transformation with mapInvalid

These general documentation improvements complement the new features added in PR #29 and help users understand validation patterns and best practices.
RJSonnenberg added a commit that referenced this pull request Mar 2, 2026
Add comprehensive documentation sections:
- Installation: How to install the library
- Quick Start: Minimal email validation example with key concepts
- FAQ / Common Patterns: Guidance on refute vs dispute, failure composition, nested collections, mapInvalid usage, and async validation
- Advanced Patterns: Detailed patterns for complex validation scenarios including:
  * Failure type composition across domains
  * Conditional field validation
  * Validating nested collections with indices
  * Using flattenProofs for nested validations
  * Cross-field validation
  * Smart constructors for validated types
  * Error transformation with mapInvalid

These general documentation improvements complement the new features added in PR #29 and help users understand validation patterns and best practices.
@RJSonnenberg RJSonnenberg force-pushed the core-validation-validators branch from b83f4c8 to 17a4211 Compare March 2, 2026 22:54
@RJSonnenberg RJSonnenberg force-pushed the core-validation-validators branch from c991526 to 964d118 Compare March 2, 2026 23:26
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.

1 participant