NumberValidators class

A class that provides common number-related validation methods.

Constructors

NumberValidators()

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

creditCard(String? value) → String?
Validates that the given value is a valid credit or debit card number.
integer(String? value, {String fieldName = 'Number'}) → String?
Validates that the given value is a whole number (integer).
number(String? value, {String fieldName = 'Number'}) → String?
Validates that the given value is a valid number.
phone(String? value, {int minLength = 7, int maxLength = 15}) → String?
Validates that the given value is a valid phone number.
range(String? value, {num? min, num? max, String fieldName = 'Number'}) → String?
Validates that the given numeric value is between min and max.