flutter_validators library
Classes
- Validator
-
A utility class for Flutter Form validation.
Provides methods that return a validator function suitable for
TextFormField.
Extensions
- AlphaX on String
- Extension providing alpha and alphanumeric validation methods on String.
- AsciiX on String
- Extension providing ASCII validation methods on String.
- Base32X on String
- Extension providing base32 validation methods on String.
- Base58X on String
- Extension providing base58 validation methods on String.
- BooleanX on String
- Extension providing boolean validation methods on String.
- CreditCardX on String
- Extension providing credit card validation methods on String.
- DateX on String
- Extension providing date validation methods on String.
- EmailX on String
- Extension providing email validation methods on String.
- EqualX on String
- Extension providing string equality methods on String.
- HexColorX on String
- Extension providing hexadecimal color validation methods on String.
- IntX on String
- Extension providing integer validation methods on String.
- IpX on String
- Extension providing IP validation methods on String.
- JsonX on String
- Extension providing JSON validation methods on String.
- LengthX on String
- Extension providing length validation methods on String.
- NumericX on String
- Extension providing numeric validation methods on String.
- PhoneX on String
- Extension providing phone number validation methods on String.
- UrlX on String
- Extension providing URL validation methods on String.
- UuidX on String
- Extension providing UUID validation methods on String.
Functions
-
equals(
String str, String comparison) → bool - Checks if two strings are exactly equal.
-
isAlpha(
String str) → bool - Checks if the string contains only letters (a-z, A-Z).
-
isAlphanumeric(
String str) → bool - Checks if the string contains only letters and numbers.
-
isAscii(
String str) → bool - Checks if the string contains only ASCII characters.
-
isBase32(
String str) → bool - Checks if the string is base32 encoded.
-
isBase58(
String str) → bool - Checks if the string is base58 encoded.
-
isBoolean(
String str) → bool - Checks if the string represents a boolean value.
-
isCreditCard(
String str) → bool - Checks if the string is a valid credit card number.
-
isDate(
String str) → bool - Checks if the string represents a valid date.
-
isEmail(
String str) → bool - Checks if the string is a valid email address.
-
isHexColor(
String str) → bool - Checks if the string is a hexadecimal color.
-
isInt(
String str) → bool - Checks if the string represents a valid integer.
-
isIP(
String str, [int? version]) → bool - Checks if the string is a valid IP address (IPv4 or IPv6).
-
isJson(
String str) → bool - Checks if the string is valid JSON.
-
isLength(
String str, int min, [int? max]) → bool - Checks if the string's length falls in a range.
-
isNumeric(
String str) → bool - Checks if the string represents a valid number.
-
isPhone(
String str) → bool - Checks if the string is a valid phone number.
-
isURL(
String str) → bool - Checks if the string is a valid URL.
-
isUUID(
String str) → bool - Checks if the string is a valid UUID (versions 1, 3, 4, or 5).