localregex 1.0.1+1 copy "localregex: ^1.0.1+1" to clipboard
localregex: ^1.0.1+1 copied to clipboard

outdated

Regular expressions package for popular patterns in Zimbabwe i.e. Passport Number, Mobile Numbers, Number Plates, etc

localregex #

This plugin allows flutter developers to check if an input matches common regex patterns in Zimbabwe This plugin works for all Flutter supported platforms i.e. Android, iOS, Web and Desktop (tested on Linux and Windows).

Developed by Ngonidzashe Mangudya

Usage #

Add dependency #

localregex: ^1.0.0

Import package #

  import 'package:localregex/localregex.dart';

Declare and initialise #

  final localregex = LocalRegex();

Use in code e.g. form field validation #

  Padding(
    padding: const EdgeInsets.all(8.0),
    child: TextFormField(
      decoration: InputDecoration(
        labelText: "Mobile Number",
      ),
      // ignore: missing_return
      validator: (value) {
        if (!localregex.isZwMobile(value)) {
          return "Not a valid Zimbabwean mobile number";
        }
      },
    ),
  ),

Check the package out on pub.dev

Or on my website

22
likes
0
pub points
68%
popularity

Publisher

verified publisheriamngoni.co.zw

Regular expressions package for popular patterns in Zimbabwe i.e. Passport Number, Mobile Numbers, Number Plates, etc

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on localregex