rsa_id_number
1.1.2, released 7 months ago by makhosandile.me
Validates, parses, and generates South African ID numbers.
What it does
A Dart utility package designed to validate South African identity numbers against standard formats, parse ID string values into structured objects containing details like date of birth and gender, and generate random valid ID numbers based on provided constraints.
AI-written summary of version 1.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Dart or Flutter application for South African users that needs to validate ID numbers.
- You need to extract birth dates, gender, and citizenship details from a South African ID string.
- You want to generate valid random South African ID numbers for testing purposes.
Skip it when
- Your application does not deal with South African identification numbers.
Strengths
- Provides built-in validation, parsing, and generation for SA ID numbers.
- Removes external third-party dependencies for validation (such as Luhn algorithm packages) to reduce supply-chain risk.
- Supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux.
Weaknesses
- Extremely niche utility limited exclusively to South African ID numbers.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Not documented
import 'package:rsa_id_number/rsa_id_validator.dart';
void main() {
String idToValidate = '9202204720082';
bool isValid = RsaIdValidator.isValid(idToValidate);
print('Is valid ID: $isValid');
}Alternatives
Packages that do the same job and could replace rsa_id_number.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - mime
Utilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
92Compare - flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare - phone_numbers_parser
Dart library for parsing, validating, and formatting international phone numbers.
87Compare
Works with
Packages commonly used together with rsa_id_number: ones it builds on, ones built on it, and its own family.