Validators class

Utility class providing validation methods for various data types.

This class contains static methods for validating strings, URLs, emails, phone numbers, file paths, and other common data formats.

Constructors

Validators()

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

isAlphanumeric(String? value) bool
Validates if the given string contains only alphanumeric characters
isLettersOnly(String? value) bool
Validates if the given string contains only letters
isNotEmpty(String? value) bool
Validates if the given string is not null or empty
isNumbersOnly(String? value) bool
Validates if the given string contains only numbers
isValidEmail(String? email) bool
Validates if the given string is a valid email
isValidFilePath(String? path) bool
Validates if the given file path is valid
isValidFileSize(int size, int maxSize) bool
Validates if the given file size is within acceptable limits
isValidLength(String? value, int minLength, int maxLength) bool
Validates if the given string length is within specified range
isValidPhoneNumber(String? phone) bool
Validates if the given string is a valid phone number
isValidUrl(String? url) bool
Validates if the given string is a valid URL