validation_pro 1.0.0 validation_pro: ^1.0.0 copied to clipboard
Validation like email address, mobile number, password, input formatter, etc.
validation_pro #
Validation like email address, mobile number, password, input formatter, etc.
Using #
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile and web development, and a full API reference.
Installation #
First, add validation_pro
as a dependency in your pubspec.yaml file.
In your flutter project add the dependency:
dependencies:
...
validation_pro:
For help getting started with Flutter, view the online documentation.
Example #
Please follow this example here.
Validation #
- Email address validation
Validate.isEmail(emailAddress);
- Mobile number validation
/// validation mobile number (Only Indian pattern and 10 digits mobile number accepted)
Validate.isMobile(mobileNumber);
- Username validation
/// Min 6 and Max 18 characters
/// Only support lowercase or uppercase or number character
/// Only support special character [._]
Validate.isUsername(username);
- Password validation
/// like password pattern
/// Min 6 and Max 12 characters
/// At least one uppercase character
/// At least one lowercase character
/// At least one number
/// At least one special character [@#$!%?]
Validate.isPassword(password)
- Input int value validation
TextField(
keyboardType: TextInputType.number,
inputFormatters: [Validate.intValueFormatter()]
)
- Input decimal value validation
TextField(
keyboardType: TextInputType.number,
inputFormatters: [Validate.decimalValueFormatter(decimalPlaceValue: 3)]
)