ValidationUtil 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
customRegexValidation(
String? text, String pattern) → bool - 自定义正则验证
-
isAlphaNumericOnly(
String? text) → bool - 验证是否只包含字母和数字
-
isAlphaOnly(
String? text) → bool - 验证是否只包含英文字母
-
isBankCard(
String? cardNumber) → bool - 验证银行卡号(Luhn算法)
-
isChineseIDCard(
String? idCard) → bool - 验证身份证号码
-
isChineseLicensePlate(
String? plate) → bool - 验证车牌号
-
isChineseOnly(
String? text) → bool - 验证是否只包含中文
-
isEmail(
String? email) → bool - 验证邮箱
-
isHexColor(
String? color) → bool - 验证颜色值(十六进制)
-
isIPAddress(
String? ip) → bool - 验证IP地址
-
isLengthInRange(
String? text, int minLength, int maxLength) → bool - 验证字符串长度范围
-
isMacAddress(
String? mac) → bool - 验证MAC地址
-
isNumberInRange(
String? number, double min, double max) → bool - 验证数字范围
-
isNumericOnly(
String? text) → bool - 验证是否只包含数字
-
isPhoneNumber(
String? phone) → bool - 验证手机号
-
isPort(
String? port) → bool - 验证端口号
-
isStrongPassword(
String? password) → bool - 验证密码强度(至少8位,包含数字和字母)
-
isUrl(
String? url) → bool - 验证URL