Skip to content
pubscout

validator_regex

1.1.1, released 3 years ago by an unverified publisher

A Dart package for validating emails, URLs, IP addresses, and other common input formats using regex.

WASM-ready
$ flutter pub add validator_regex
Source repository

What it does

Validator_regex provides simple helper methods to validate standard input strings such as email addresses, URLs, IP addresses, digits, alphanumeric strings, passwords, and credit card numbers using regular expressions. It can be used to quickly verify user input in Flutter applications.

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

Use it when

  • You need to validate common user input formats like emails, URLs, and IP addresses in a Flutter application.
  • You want a lightweight utility library for checking password strength, digits, or credit card numbers.

Skip it when

  • You need complex form state management or a full form building engine.

Strengths

  • Provides a wide variety of out-of-the-box string validation methods (emails, URLs, IPs, credit cards, passwords).
  • Simple and straightforward static method API.

Weaknesses

  • Relies purely on regex patterns which may not cover every edge case of complex specifications.
  • Limited documentation on advanced customization of the underlying regex patterns.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:validator_regex/validator_regex.dart';

bool isEmailValid = Validator.email('test@test.com');
bool isUrlValid = Validator.url('https://www.test.com');
bool isIpValid = Validator.ipAddress('192.168.1.1');

Alternatives

Packages that do the same job and could replace validator_regex.

  • email_validator

    Choose email_validator if you specifically require a robust, dedicated package solely focused on email address validation.