username_validator 0.1.1
username_validator: ^0.1.1 copied to clipboard
A straightforward flutter username validator that provides common validation options.
Username validator #
A straightforward flutter username validator that provides common validation options.
Usage #
- Add dependency to your package's pubspec.yaml file:
dependencies: username_validator: ^0.0.1 # change to latest version
- Run from the command line:
$ pub get
Alternatively, your editor might support pub. Check the docs for your editor to learn more.
- 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.