TextValidators class

A class that provides text-related validation methods.

Constructors

TextValidators()

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

alphanumeric(String? value, {String fieldName = 'Field'}) → String?
Validates that the given value contains only letters and numbers.
length(String? value, {int? min, int? max, String fieldName = 'Field'}) → String?
Validates the length of the given value.
name(String? value, {int minLength = 2, String fieldName = 'Name'}) → String?
Validates that the given value is a valid name.
username(String? value, {int minLength = 3, int maxLength = 30}) → String?
Validates that the given value is a valid username.