Username validator

A straightforward flutter username validator that provides common validation options.

Usage

  1. Add dependency to your package's pubspec.yaml file:

dependencies: username_validator: ^0.0.1 # change to latest version

  1. Run from the command line:

$ pub get

Alternatively, your editor might support pub. Check the docs for your editor to learn more.

  1. Import in your Dart code:

import 'package:username_validator/username_validator.dart';

Example

bool simple = UValidator.validateThis(username: "jam_s")

bool basic = UValidator.validateThis(pattern:RegPattern.basic,username: "jam_s")

bool strict = UValidator.validateThis(pattern:RegPattern.strict,username: "jam_s")

Patterns

RegPattern.simple RegPattern.basic RegPattern.strict

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket. Pull request are also welcome.

Libraries

username_validator