Skip to content
pubscout

validators

3.0.0, released 6 years ago by an unverified publisher

String validation and sanitization library for Dart

WASM-ready
$ flutter pub add validators
Source repository

What it does

Provides a collection of functions to validate emails, URLs, IPs, and other string patterns, as well as sanitizing input strings.

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

Use it when

  • Validating user input in forms
  • Sanitizing strings before storage or display
  • Implementing simple validation logic in Dart applications

Skip it when

  • You need complex, custom validation logic beyond simple checks
  • You prefer a declarative form builder with built‑in validation

Strengths

  • Wide range of built‑in validators
  • Null safety support
  • No external dependencies

Weaknesses

  • Limited to string validation only
  • No UI components or form integration helpers

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:validators/validators.dart';

bool isValid = isEmail('test@example.com');

Alternatives

Packages that do the same job and could replace validators.

  • formz

    A unified form representation and validation library for Dart.

  • flutter_pw_validator

    Live password validation widget with progress bar, checklist, and Unicode-aware rules.

  • advanced_forms

    Flutter form validation and state management with typed controllers and validators.

  • ack

    Schema validation library with bidirectional codecs and JSON Schema support.

Works with

Packages commonly used together with validators: ones it builds on, ones built on it, and its own family.