AntdFormRule class

检验规则 @l AntdFormItem

Inheritance

Constructors

AntdFormRule({List<String>? enums, int? len, int? max, String? message, int? min, RegExp? pattern, bool? required, AntdFormRuleValidator? validator, AntdFormTrigger? trigger, bool warningOnly = false, bool? whitespace, AntdFormRuleType? type})
const

Properties

enums → List<String>?
是否匹配枚举中的值(需要将 type 设置为 enum)
final
hashCode → int
The hash code for this object.
no setterinherited
len → int?
string 类型时为字符串长度;number 类型时为确定数字; array 类型时为数组长度
final
max → int?
必须设置 type:string 类型为字符串最大长度;number 类型时为最大值;array 类型时为数组最大长度
final
message → String?
错误信息,不设置时会通过模板自动生成
finalinherited
min → int?
必须设置 type:string 类型为字符串最小长度;number 类型时为最小值;array 类型时为数组最小长度
final
pattern → RegExp?
正则表达式匹配
final
required → bool?
是否为必选字段
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trigger → AntdFormTrigger?
设置触发验证时机
finalinherited
type → AntdFormRuleType?
类型
final
validator → AntdFormRuleValidator?
自定义校验
finalinherited
warningOnly → bool
仅警告,不阻塞表单提交
finalinherited
whitespace → bool?
如果字段仅包含空格则校验不通过
final

Methods

buildValidator() → AntdFormRuleValidator?
inherited
buildValidList() → List<AntdFormRuleValid>
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