wc_form_validators
1.2.0, released a year ago by wisecrab.com
Utility functions and validators for Flutter form fields
WASM-ready
What it does
Provides a set of reusable form field validator functions inspired by Angular Validators. It covers common validation rules such as required fields, email formats, numerical ranges, character length limits, regular expressions, and field matching.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a quick and straightforward way to validate TextFormField inputs
- You want to combine multiple validation checks using a compose utility
Skip it when
- You are using a heavy form-building state library that includes its own complex validation engine
Strengths
- Easy to compose multiple validators together
- Includes a wide array of built-in validation rules like email, min/max length, and pattern matching
Weaknesses
- Limited to string-based form field validation
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
TextFormField(
decoration: InputDecoration(
labelText: 'Email',
),
validator: Validators.compose([
Validators.required('Email is required'),
Validators.email('Invalid email address'),
]),
)Alternatives
Packages that do the same job and could replace wc_form_validators.
- email_validator_flutter
A Dart and Flutter package for validating email addresses using regular expressions.
50Compare - validator_regex
A Dart package for validating emails, URLs, IP addresses, and other common input formats using regex.
39Compare