Skip to content
pubscout

localregex

4.0.9, released 4 weeks ago by iamngoni.co.zw

Collection of common regex patterns and validation helpers specifically for Zimbabwe.

WASM-ready
$ flutter pub add localregex
Source repository

What it does

Provides static methods and string extensions to validate and format Zimbabwean mobile numbers, landlines, national IDs, passports, driver's licenses, and student IDs, along with generic checks like email and password validation.

AI-written summary of version 4.0.9, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter application targeting users in Zimbabwe and need local input validation.
  • You need to format and parse Zimbabwean phone numbers and national IDs into standard layouts.

Skip it when

  • You require global validation patterns outside of common standards or specific Zimbabwean identifiers.

Strengths

  • Covers multiple local formats including Econet, NetOne, and Telecel mobile ranges, national IDs, and student IDs.
  • Provides built-in string extensions for phone number and ID formatting.

Weaknesses

  • Highly specialized for a single geographic region (Zimbabwe).

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:localregex/localregex.dart';

final isValid = LocalRegex.isZimMobile('0777213388');
String? formatted = '+263777213388'.formatNumber(formatType: FormatType.regular);