validation_plus 1.3.0
validation_plus: ^1.3.0 copied to clipboard
Validation like email address, mobile number, input formatter, etc.
validation_plus #
Validation like mobile, email, input.
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_plus as a dependency in your pubspec.yaml file.
In your flutter project add the dependency:
dependencies:
...
validation_plus:
For help getting started with Flutter, view the online documentation.
Example #
Please follow this example here.
Validation #
- Email address validation
Validate.isValidEmail(emailAddress);
- Mobile number validation
/// validation mobile number (Only Indian pattern and 10 digits mobile number accepted)
Validate.isValidMobile(mobileNumber);
- Username validation
/// Min 6 and Max 18 characters
/// Only support lowercase or uppercase or number character
/// Only support special character [._]
Validate.isValidUsername(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.isValidPassword(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)]
)
