BasicValidators class

A class that provides basic common validation methods.

Constructors

BasicValidators()

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

confirmPassword(String? value, String? original) → String?
Validates that value matches original.
email(String? value) → String?
Validates that the given value is a valid email address.
password(String? value, {int minLength = 8, bool requireUppercase = false, bool requireLowercase = false, bool requireNumber = false, bool requireSpecialChar = false}) → String?
Validates that the given value meets password strength requirements.
pattern(String? value, Pattern pattern, {String errorMessage = 'Invalid format', String fieldName = 'Field'}) → String?
Validates that the given value matches the provided pattern.
required(String? value, {String fieldName = 'Field'}) → String?
Validates that the given value is not null or empty.
url(String? value, {bool requireScheme = true}) → String?
Validates that the given value is a valid URL.