Note
Ecuador does not currently use IBAN in practice. Banks use CCI instead. IBAN support is included for ISO compliance.
High-performance validation for Ecuadorian government IDs (cédula, RUC) and financial data (IBAN).
cargo add ec-validatoruse ec_validator::{cedula, ruc, iban};
let cedula = cedula::validate("1713175071").is_ok(); // true
let ruc = ruc::validate("1790085783001").is_ok(); // true (juridical)
let rtype = format!("{:?}", ruc::ruc_type("1790085783001")); // JuridicalEntity
let iban = iban::validate("EC8912345678901234567890").is_ok(); // depends on check digits| Feature | Description |
|---|---|
| Cédula | 10-digit national ID (Mod-10) |
| RUC | 13-digit taxpayer ID: Natural Person, Juridical Entity, Public Entity |
| IBAN | ISO 13616 (Mod-97) |
| Variant | Description |
|---|---|
| InvalidLength | Wrong number of digits/characters |
| InvalidCheckDigit | Check digit validation failed |
| InvalidProvinceCode | Invalid province code (not 01-24) |
| InvalidRucType | Invalid RUC type indicator |
| InvalidFormat | Invalid character format |
| Flag | Description | Default |
|---|---|---|
serde |
Enable serialization/deserialization | No |
wasm |
Enable WebAssembly bindings | No |
- CCI (Código de Cuenta Interbancaria) validation
Contributions welcome! Specifically seeking help implementing bank account algorithms (local and interbank). Contact the maintainers for details.
MIT