validators
3.0.0, released 6 years ago by an unverified publisher
String validation and sanitization library for Dart
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.
90Compare - flutter_pw_validator
Live password validation widget with progress bar, checklist, and Unicode-aware rules.
87Compare - advanced_forms
Flutter form validation and state management with typed controllers and validators.
85Compare - ack
Schema validation library with bidirectional codecs and JSON Schema support.
83Compare
Works with
Packages commonly used together with validators: ones it builds on, ones built on it, and its own family.
- flutter_slickBuilt on validatorsAn opinionated MVVM application framework with typed routing, auth, and form widgets.
- flutter_guidBuilt on validatorsEmulates C# Guid in Flutter to generate UUIDs and add Guid variables to classes.
- obs_websocketBuilt on validatorsAn OBS WebSocket client written in Dart for remote-controlling Open Broadcaster Software.