localregex 1.0.1+1

Flutter Android iOS web

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

9
likes
100
pub points
28%
popularity

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

Homepage

Documentation

API reference

Uploader

el.nick.ngonie@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on localregex