auto_validate 1.0.2 auto_validate: ^1.0.2 copied to clipboard
Auto Validate Package. This package will help you to auto validate used regular expressions. No need to write the code by yourself, simply you can use this package for not waste time and it will help [...]
Auto Validate #
Auto Validate Package is unique and easy to use.
Importance #
This package will help you to auto validate used regular expressions. No need to write the code by yourself, simply you can use this package for not waste time and it will help you a lot.
Usage #
A simple usage of Auto Validate example:
import 'package:auto_validate/auto_validate.dart';
validation() {
var email = 'Dev.Mahmoud.ElShenawy@gmail.com';
var name = 'Mahmud El Shenawy';
var password = '@MahmoudElShenawy2021';
var phone = '+201098415860';
AutoValidate.email(email.toString())
? print('Email is Valid')
: print('Email is Invalid');
AutoValidate.userName(name.toString())
? print('User Name is Valid')
: print('User Name is Invalid');
AutoValidate.password(password.toString())
? print('Password is Valid')
: print('Password is Invalid');
AutoValidate.phone(phone.toString())
? print('Phone is Valid')
: print('Phone is Invalid');
}
A simple usage of Form Validator Example:
import 'package:auto_validate/auto_validate.dart';
TextFormField(
controller: emailController,
decoration: InputDecoration(
hintText: "Email",
border: OutlineInputBorder(
borderSide: BorderSide(),
),
),
validator: FormValidator.email(
errorMessage: 'Please Enter Valid Email',
),
);
More Details #
-
Make validation on all next elements
- Arabic Input
- UserName (It Contains Alphanumeric, underscores and hyphens and its long between 3 to 16 characters)
- Password (It Contains at least 1 lowerCase letter, upperCase letter, number and 8 characters long)
- Strong Password (It Contains at least 1 lowerCase letter, upperCase letter, number, special character and 8 characters long
- Phone Number
- International Phone Number
- Credit Card
- SNN (Social Security Number)
- Passport
- Date (MM/DD/YYYY)
- Date (YYYY/MM/DD)
- IPV4 (Internet Protocol Version 4)
- IPV6 (Internet Protocol Version 6)
- Alphanumeric
- Alphanumeric With Spaces
- Alphabet
- LowerCase
- UpperCase
- Digits
- Decimals
- Signed Decimals
- URL
- Base64
- Base58
- Base32
- ASCII (American Standard Code for Information Interchange)
- ByteLength (Check String's Length (In Bytes) In A Range)
- JWT (Json Web Token)
- ISIN (International Securities Identification Number)
- ISBN (International Standard Book Number - 'You Have To Choose One Of Its Versions 10 or 13')
- MAC Address (Media Access Control - 'You Have To Choose With Colons Or Not')
- BIC (Bank Identifier Code)
- MD5 Hash (Message-Digest Algorithm)
- Capitalized
- Emoji
- Hexadecimal Color
- Hexadecimal Number
- Latitude and Longitude
- Magnet URI
- Mongo ID
- Multibyte Character Sets
- Null
- Non-Null
- SameType
- Match
- MinLength
- MaxLength
Created By #
- Mahmoud El Shenawy - Mahmoud-ElShenawy
This project is licensed under the MIT License - see the LICENSE file for details