IstValidator 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
Static Methods
-
confirmPassword(String password, String confirmPassword)
→ bool
-
Validates if the password and confirm password are the same.
Returns
true
if password and confirm password are the same, otherwise false
.
Example:
-
customValidation(String value, {List<FormValidatorRule> rules = const []})
→ bool
-
Allows custom validation logic with a callback function.
Returns
true
if the custom validation passes, otherwise false
.
Example:
-
validateEmail(String email)
→ bool
-
Validates email address using EmailFormatRule.
Returns
true
if email is valid, otherwise false
.
Example:
-
validateIsEmpty(String value)
→ bool
-
Validates if the value is empty using RequiredRule.
Returns
true
if value is empty, otherwise false
.
Example:
-
validateIsNotEmpty(String value)
→ bool
-
Validates if the value is not empty using RequiredRule.
Returns
true
if value is not empty, otherwise false
.
Example:
-
validateLink(String value)
→ bool
-
Validates if the value is a valid URL using ValidationPatterns.urlPattern.
Returns
true
if value is a valid URL, otherwise false
.
Example:
-
validateMaxLength(String value, int maxLength)
→ bool
-
Validates if the value matches the max length using MaxLengthRule.
Returns
true
if the value is within the max length, otherwise false
.
Example:
-
validateMinLength(String value, int minLength)
→ bool
-
Validates if the value matches the min length using MinLengthRule.
Returns
true
if the value is at least the min length, otherwise false
.
Example:
-
validateNumber(String value)
→ bool
-
Validates if the value is a number.
Returns
true
if value is a number, otherwise false
.
Example: