StringValidator class

Constructors

StringValidator()

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

isValidCard(String card) bool
Validates a credit card number using the Luhn algorithm. Returns true if the card number is valid, false otherwise.
isValidDate(String date) bool
Validates a date string in the format YYYY-MM-DD. Returns true if the date is valid, false otherwise.
isValidEmail(String email) bool
Validates an email address. Returns true if the email is valid, false otherwise.
isValidPassword(String password, {int minLength = 8, bool requireUppercase = true, bool requireLowercase = true, bool requireNumbers = true, bool requireSpecialChars = true}) bool
Validates a password based on common security requirements. Returns true if the password meets the requirements, false otherwise.
isValidPhone(String phone) bool
Validates a phone number. Returns true if the phone number is valid, false otherwise.