Validator class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
checkPassword(String password)
→ double
-
check password strong and return double value
0-1
. original source code is
here
-
getPortNumber(String value)
→ int?
-
check if the string is a port number
-
isAlpha(String value)
→ bool
-
check if the string
value
contains only letters (a-zA-Z).
-
isAlphanumeric(String value)
→ bool
-
check if the string
value
contains only letters and numbers
-
isAscii(String value)
→ bool
-
check if the string contains ASCII chars only
-
isBase64(String value)
→ bool
-
check if a string
value
is base64 encoded
-
isCreditCard(String value)
→ bool
-
check if the string is a credit card
-
isEmail(String value)
→ bool
-
check if the string
value
is an email
-
isFQDN(String value, {bool requireTld = true})
→ bool
-
check if the string
value
is a fully qualified domain name (e.g. domain.com).
-
isHexadecimal(String value)
→ bool
-
check if the string
value
is a hexadecimal number
-
isHexColor(String value)
→ bool
-
check if the string
value
is a hexadecimal color
-
isIP(String value, [dynamic version])
→ bool
-
check if the string
value
is IP version
4 or 6
-
isISBN(String value, [dynamic version])
→ bool
-
check if the string is an ISBN (version 10 or 13)
-
isLength(String value, int min, [int? max])
→ bool
-
check if the length of the string
value
falls in a range
-
isMultibyte(String value)
→ bool
-
check if the string contains one or more multibyte chars
-
isNumeric(String value)
→ bool
-
check if the string
value
contains only numbers
-
isPostalCode(String value, String locale)
→ bool
-
-
isURL(String value, {List<String?> protocols = const ['http', 'https', 'ftp'], bool requireTld = true, bool requireProtocol = false})
→ bool
-
check if the string
value
is a URL
-
isUUID(String value, [dynamic version])
→ bool
-
check if the string is a UUID (version 3, 4 or 5).