auto_validate
3.0.8, released a year ago by aerotix.net
Provides regex‑based validation methods and FormValidator helpers for strings and form fields.
WASM-ready
What it does
The package offers a collection of static validation functions and String extension methods for common data formats such as email, phone, password, etc. It also supplies FormValidator utilities that return error messages for use in TextFormField validators.
AI-written summary of version 3.0.8, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need quick, out‑of‑the‑box validation for many common input types without writing regexes yourself
- You want a single dependency to handle both inline string checks and FormField validators
Skip it when
- You require custom validation logic that isn’t covered by the provided regexes
- You prefer a code‑generation based solution for type‑safe models
Strengths
- Huge list of ready‑made validators
- Simple API with extension methods
- Works on all Flutter platforms
Weaknesses
- Relies on regexes which may not cover all edge cases
- No code‑generation or type‑safe model support
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:auto_validate/auto_validate.dart';
void main(){
const email='test@example.com';
print(email.isValidEmail); // true
print(AutoValidate.password('Passw0rd!')); // true
}Alternatives
Packages that do the same job and could replace auto_validate.
- email_validator
Provides a lightweight, well‑tested email validator if you only need that feature
50Compare - formz
Offers a declarative, type‑safe form validation approach with built‑in error handling
90Compare