ValidatorUtils class
验证器工具类
Constructors
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isAlphabetOnly(
String s) → bool - 检查字符串是否只包含字母。(没有空格)
-
isAPK(
String s) → bool - Checks if string is an APK file. 检查字符串是否为apk文件
-
isAudio(
String s) → bool - Checks if string is an audio file. 检查字符串是否为音频文件
-
isBool(
String s) → bool - 检查字符串是否为布尔值
-
isCamelCase(
String s) → bool - Checks if string value is camelcase. 检查字符串值是否驼峰大小写。
-
isCapitalize(
String s, {bool firstOnly = false}) → bool - Checks if string value is capitalize. 检查字符串值是否大写
-
isCaseInsensitiveContains(
String a, String b) → bool - Checks if a contains b (Treating or interpreting upper- and lowercase letters as being the same). 检查a是否包含b(将大小写字母视为相同或解释)。
-
isCaseInsensitiveContainsAny(
String a, String b) → bool - Checks if a contains b or b contains a (Treating or interpreting upper- and lowercase letters as being the same). 检查a中是否包含b或b中是否包含a(将大小写字母视为相同)。
-
isDateTime(
String s) → bool - Checks if string is DateTime (UTC or Iso8601). 检查字符串是否为时间
-
isDocument(
String s) → bool - Checks if string is an Doc file. 检查字符串是否为doc文件
-
isEmail(
String s) → bool - Checks if string is email. 检查字符串是否为email文件
-
isExcel(
String s) → bool - Checks if string is an Excel file. 检查字符串是否为excel文件
-
isHTML(
String s) → bool - Checks if string is an HTML file. 检查字符串是否为html文件
-
isImage(
String s) → bool - Checks if string is an image file. 检查字符串是否为图像文件
-
isIPv4(
String s) → bool - Checks if string is IPv4. 检查字符串是否为ipv4
-
isIPv6(
String s) → bool - Checks if string is IPv6. 检查字符串是否为ipv6
-
isLengthBetween(
dynamic s, int minLength, int maxLength) → bool - Checks if length of data is BETWEEN minLength to maxLength. 检查数据长度是否在minLength到maxLength之间。
-
isLengthEqualTo(
dynamic s, int maxLength) → bool - Checks if length of data is EQUAL to maxLength. 检查数据长度是否等于maxLength。
-
isLengthGreaterOrEqual(
dynamic s, int maxLength) → bool - Checks if length of data is GREATER OR EQUAL to maxLength. 检查数据长度是否大于或等于maxLength。
-
isLengthGreaterThan(
dynamic s, int maxLength) → bool - Checks if length of data is GREATER than maxLength. 检查数据长度是否大于maxLength
-
isLengthLowerOrEqual(
dynamic s, int maxLength) → bool - Checks if length of data is LOWER OR EQUAL to maxLength. 检查数据长度是否小于或等于maxLength
-
isLengthLowerThan(
dynamic s, int maxLength) → bool - Checks if length of data is LOWER than maxLength. 检查数据长度是否小于maxLength
-
isMD5(
String s) → bool - Checks if string is MD5 hash. 检查字符串是否为md5
-
isNumericOnly(
String s) → bool - 检查字符串是否只包含数字 只有数值不接受double数据类型的
-
isOneAKind(
dynamic s) → bool -
Checks if all data have same value.
检查所有数据是否具有相同的值
Example: 111111 -> true, wwwww -> true,
1,1,1,1
-> true -
isPalindrome(
String s) → bool - Checks if string is Palindrome. 检查字符串是否为回文
-
isPDF(
String s) → bool - Checks if string is an pdf file. 检查字符串是否为pdf文件
-
isPPT(
String s) → bool - Checks if string is an PPT file. 检查字符串是否为ppt文件
-
isSHA1(
String s) → bool - Checks if string is SHA1 hash. 检查字符串是否为sha1
-
isSHA256(
String s) → bool - Checks if string is SHA256 hash. 检查字符串是否为sha256
-
isTxt(
String s) → bool - Checks if string is an txt file. 检查字符串是否为txt文本文件
-
isURL(
String s) → bool - Checks if string is URL. 检查字符串是否为url文件
-
isVector(
String s) → bool - 检查string是否为vector文件
-
isVideo(
String s) → bool - Checks if string is an video file. 检查字符串是否为视频文件