Skip to content

feat: add validator composition, pluggable messages, and opt-in strict rules (v1.3.0) - #5

Closed
divyanshub024 wants to merge 1 commit into
mainfrom
codex/flutter-validators-1.3
Closed

feat: add validator composition, pluggable messages, and opt-in strict rules (v1.3.0)#5
divyanshub024 wants to merge 1 commit into
mainfrom
codex/flutter-validators-1.3

Conversation

@divyanshub024

@divyanshub024 divyanshub024 commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Releases 1.3.0. The headline change is that the package no longer requires
Flutter — lib/ has no Flutter imports and the flutter: environment
constraint is dropped, so the validators now run in server-side and CLI Dart
projects. Flutter form usage is unchanged.

What's new

  • Composition — generic FieldValidator<T> with compose, aggregate,
    any, conditional/when/unless, transform, and fluent chaining
    (.and(), .or(), .withMessage()).
  • MessagesValidationMessage/ValidationMessages resolve errors via a
    pluggable resolver keyed by stable IDs, with no intl dependency. An
    explicit errorMessage: still takes precedence.
  • New validators — IBAN, BIC, CVC, card expiry, ISBN-10/13, fixed-length
    hashes, MIME types, data URIs, ISO-8601 dates, 24-hour times, numeric
    ranges, divisibility, text boundaries, and word counts.
  • Opt-in strict modes — JWT, Base32, credit card, URL, email, FQDN, and
    UUID accept configuration; all default to 1.2 behavior.
  • Docs — README rewritten; new guides under doc/ for composition,
    messages, migration, and strict validation. Examples are covered by tests.
  • Example app — five interactive validation flows with widget tests.

Compatibility

No public symbol was removed: all 42 existing Validator.* factories are
retained and 20 added. Non-required validators still accept null and empty so
they compose with required. Strict validation is opt-in.

Note: Validator is now abstract final, so it can no longer be
instantiated or subclassed. It has only ever exposed static members.

Verification

dart format · dart analyze · 184 Dart tests · flutter analyze ·
5 widget tests · 96.64% line coverage · dart doc with zero warnings ·
pure-Dart smoke test · dart pub publish --dry-run with zero warnings.

@divyanshub024 divyanshub024 changed the title [codex] Launch flutter_validators 1.3 Launch flutter_validators 1.3 Jun 15, 2026
@divyanshub024
divyanshub024 deleted the codex/flutter-validators-1.3 branch July 27, 2026 10:12
@divyanshub024 divyanshub024 changed the title Launch flutter_validators 1.3 feat: add validator composition, pluggable messages, and opt-in strict rules (v1.3.0) Jul 27, 2026
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