Validators class
A collection of stateless validation functions.
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
-
isBlank(
String? value) → bool -
Returns
truewhen the value is empty or null-safe blank. -
isCreditCard(
String value) → bool -
Returns
truefor a valid credit card number using the Luhn algorithm. -
isEmail(
String value) → bool -
Returns
truefor a valid email address. -
isIBAN(
String value) → bool -
Returns
truefor an IBAN-format string (2 letters + digits). -
isNotBlank(
String? value) → bool -
Returns
truewhen the value is not blank. -
isNumber(
String value) → bool -
Returns
truefor a valid numeric string (integer or decimal). -
isPhone(
String value) → bool -
Returns
truefor a valid phone number (6–15 digits, optional prefix). -
isStrongPassword(
String value) → bool -
Returns
truefor a strong password (min 8 chars, mixed case + digit). -
isURL(
String value) → bool -
Returns
truefor a valid URL. -
isUsername(
String value) → bool -
Returns
truefor a valid username (3–20 chars, letters/digits/_).