menu
form_validation package
documentation
form_validation.dart
MaxNumberValidator class
MaxNumberValidator class
dark_mode
light_mode
MaxNumberValidator
class
Implemented types
ValueValidator
Annotations
@
immutable
Constructors
MaxNumberValidator
({
required
double
number
})
Constructs the validator with the maximum
number
that the value may be.
Properties
hashCode
→
int
The hash code for this object.
no setter
inherited
number
→
double
final
runtimeType
→
Type
A representation of the runtime type of the object.
no setter
inherited
Methods
noSuchMethod
(
Invocation
invocation
)
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson
(
)
→
Map
<
String
,
dynamic
>
Returns the JSON-compatible representation of this validator.
toString
(
)
→
String
Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.
inherited
validate
(
{
required
String
label
,
required
Translator
translator
,
required
String
?
value
})
→
String
?
Ensures the value is a valid number that is at no larger than the assigned
number
.
override
Operators
operator ==
(
Object
other
)
→
bool
The equality operator.
inherited
Static Methods
fromDynamic
(
dynamic
map
)
→
MaxNumberValidator
Processes the validator object from the given
map
which must be an actual Map or a Map-like object that supports the
[]
operator. Any non-null object that is not Map-like will result in an error. A
null
value will result in a return value of
null
.
Constants
type
→ const
String
form_validation package
documentation
form_validation
MaxNumberValidator class
form_validation library