formix_core 0.1.0 copy "formix_core: ^0.1.0" to clipboard
formix_core: ^0.1.0 copied to clipboard

Generic, type-safe validation engine for Dart. Build composable, reusable validators with a fluent API. The core package of the Formix ecosystem.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.0 - 2026-01-23 #

Added #

  • Initial release of formix_core
  • Formix<T, E> - Base abstraction for all validators
  • ValidationResult<T, E> - Sealed class with Valid, Invalid, and InvalidAll variants
  • Rule<T, E> - Single validation rule abstraction
  • PredicateRule<T, E> - Create rules from simple predicates
  • FunctionRule<T, E> - Create rules from validation functions
  • Composition utilities:
    • AllOf - Validate all rules (AND logic)
    • AnyOf - Validate any rule (OR logic)
    • Chain - Sequential validation with short-circuit
    • Conditional - Conditional validation
    • Optional - Skip validation for null values
    • Transform - Transform input before validation
  • Caching utilities:
    • CachedFormix - Cache validation results
    • LazyFormix - Lazy validator initialization
    • LruCachedFormix - LRU cache for validation results
  • Extension methods for fluent API:
    • .andThen() - Chain validators
    • .when() - Conditional validation
    • .optional() - Make validators optional
    • .cached() - Add caching
    • .lruCached() - Add LRU caching
  • ErrorMessageFormatter - Format error messages with context
0
likes
150
points
112
downloads

Publisher

unverified uploader

Weekly Downloads

Generic, type-safe validation engine for Dart. Build composable, reusable validators with a fluent API. The core package of the Formix ecosystem.

Homepage
Repository (GitHub)
View/report issues

Topics

#validation #form #dart #input-validation #form-validation

Documentation

Documentation
API reference

License

MIT (license)

More

Packages that depend on formix_core