Skip to content

Reference Index

Chris Michael edited this page Sep 29, 2026 · 9 revisions

Pudu

Reference Index

Every module in @chrismichaelps/pudu-lang-validator@0.1.1, with its chapter.

Module Purpose Chapter
PuduLangValidator Package version Getting Started
PuduLangValidator.Rule Property rules, predicates, messages, conditions, sets Rules And Validators
PuduLangValidator.Validator Compose and run rules, select properties and sets Rules And Validators
PuduLangValidator.Selection Path matching behind property selection Nested Data
PuduLangValidator.Rules.Text Text checks Built In Checks
PuduLangValidator.Rules.Number Integer checks Built In Checks
PuduLangValidator.Rules.Decimal Exact decimal shape Built In Checks
PuduLangValidator.Rules.Presence Optional values Built In Checks
PuduLangValidator.Rules.Collection Array checks and per-element chains Built In Checks
PuduLangValidator.Rules.Comparison Equality and membership Built In Checks
PuduLangValidator.Rules.Ordering Ordering, including cross-property Built In Checks
PuduLangValidator.Rules.Child Nested and collection child validators Nested Data
PuduLangValidator.Rules.Case One variant of an optional value Nested Data
PuduLangValidator.Advanced Custom, dependent, and conditional rules Conditions And Sets
PuduLangValidator.Localization Message catalogs by locale Messages And Metadata
PuduLangValidator.Result Failure and result queries Testing Results
PuduLangValidator.Testing Validation assertions Testing Results
PuduLangValidator.Async Awaited rules and validators Async Validation
PuduLangValidator.Http Reports, problems, and 422 responses Http Responses

Full function signatures carry /// documentation for the language server; hover any name in an editor to read it. The per-module design notes live in the repository wiki/src mirrors.

Core types

Type Shape
Result.Failure propertyName, errorMessage, errorCode, severity, customState
Result.ValidationResult isValid, errors in declaration order
Result.Severity Error, Warning, Info
Validator.Validator rules, stop, preflight
Validator.Options properties, ruleSets, includeDefault
Rule.ContextData Map[Str, Json.Json], threaded unchanged through every check
Localization.Catalog Messages keyed by lowercased locale and code
Async.AsyncRule name, ruleSets, severityOverride, stateOverride, run
Testing.FailureQuery all failures, matched failures
Validator.Validator rules, stop, preflight
Rule.RuleBuilder named property, pending checks, display name, rule sets
Rule.Rule name, ruleSets, run
Async.AsyncValidator rules, stop, preflight

Key functions by chapter

Function Chapter
Rule.ruleFor, Rule.must, Rule.build, Validator.create, Validator.add, Validator.validate Getting Started
Rule.mustWith, Rule.withMessage, Rule.withCode, Validator.include Rules And Validators
Rule.mustWithContext, Rule.withMessageFrom, Rule.withSeverityFrom, Rule.withStateFrom, Rule.stopOnFirst, Rule.whenCurrent, Validator.validateWithData, Validator.include Rules And Validators
Text.emailAddress, Text.matches, Text.creditCard, Text.enumName, Presence.*, Decimal.precisionScale, Comparison.oneOf, Comparison.equalToProperty, Ordering.greaterThanProperty, Child.setOptionalValidator, Case.forCase Built In Checks
Number.*, Text.length, Text.empty, Ordering.*, Comparison.equal, Comparison.notEqual, Collection.notEmpty, Collection.empty, Collection.forEach, element chains Built In Checks
Child.setValidator, Child.forEachValidator, Validator.includeProperties Nested Data
Selection.covers, Selection.overlaps, Selection.relative, Validator.onlyRuleSets, Validator.includeRulesNotInRuleSet Nested Data
Rule.when, Rule.unless, Rule.inRuleSet, Validator.onlyRuleSets, Validator.allRuleSets, Validator.withPreValidation Conditions And Sets
Advanced.custom, Advanced.customWithContext, Advanced.dependent, Advanced.when, Validator.stopOnFirst Conditions And Sets
Rule.mustWithArguments, Localization.localized, Localization.withMessage, Localization.empty Messages And Metadata
Localization.messageFor Messages And Metadata
Async.mustAsync, Async.mustAsyncWithContext, Async.fromSync, Async.validateAsync, Async.validateAsyncWith Async Validation
Async.forEachAsync, Async.forEachWhereAsync, Async.whenAsync, Async.customAsync, Async.stopOnFirst, Async.validateAsyncWithData Async Validation
Async.setValidatorAsync, Async.setOptionalValidatorAsync, Async.forEachValidatorAsync, Async.inRuleSet, Async.when, Async.withPreValidation, Async.withPreValidationAsync Async Validation
Testing.testValidate, Testing.forProperty, Testing.withCode, Testing.hasAny, Testing.hasNone, Testing.hasErrorFor, Testing.hasCode, Testing.onlyErrorsFor Testing Results
Testing.withMessage, Testing.withoutMessage, Testing.withSeverity, Testing.withoutSeverity, Testing.withState, Testing.withoutState Testing Results
Rule.withArgument, Rule.withArgumentFrom, Rule.withName, Rule.overridePropertyName, Rule.withSeverity, Rule.withState Messages And Metadata
Rule.unless, Rule.unlessCurrent, Advanced.unless, Validator.allRuleSets Conditions And Sets
Collection.forEachWhere, Collection.forEachWhereIndexed, Collection.stopOnFirst Nested Data
Collection.inRuleSet Nested Data
Async.forEachWhereAsyncWithContext, Async.withSeverityFrom, Async.withStateFrom Async Validation
Ordering.greaterThanOrEqualTo, Ordering.exclusiveBetween, Ordering.lessThanProperty, Ordering.greaterThanOrEqualToProperty, Ordering.lessThanOrEqualToProperty, PuduLangValidator.version, Validator.accepts Built In Checks
Result.messages, Result.forProperty, Result.toDictionary, Result.toResult, Result.fromFailures, Testing.testValidateWith, Testing.hasNoErrorFor, Testing.only Testing Results
Http.toReport, Http.problem, Http.respond Http Responses

Related

Clone this wiki locally