ethio_validators 0.2.0
ethio_validators: ^0.2.0 copied to clipboard
Validation and formatting utilities for Ethiopian data: mobile phone numbers (Ethio Telecom & Safaricom) and ETB currency. Pure Dart, dependency-free.
Changelog #
0.2.0 #
- Added
EthiopianNationalIdValidatorto validate and format 12-digit numeric Fayda IDs.
0.1.0 #
Initial release.
EthiopianPhoneValidator— validate, normalize, and format Ethiopian mobile numbers across Ethio Telecom (9…) and Safaricom Ethiopia (7…) ranges.- Accepts
09XXXXXXXX,2519XXXXXXXX,+2519XXXXXXXX, bare9XXXXXXXX, and the7…equivalents, ignoring spaces, dashes, dots, and parentheses. isValid,carrierOf,normalize/tryNormalize(to E.164), andformat(local / international / E.164).
- Accepts
EtbFormatter— format and parse Ethiopian Birr amounts.- Configurable symbol, prefix/suffix position, decimal digits, and thousands/ decimal separators.
formatwith correct grouping, sign handling, and rounding;parse/tryParseback to a number, tolerant of symbol and separator noise.
- Pure Dart, zero runtime dependencies.
- Full unit test suite and a runnable command-line example.