XFormValidator class

Validator class that provides various common validation types with customizable error messages

Constructors

XFormValidator()

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

alphabetic({String? message}) String? Function(String?)
Validates only letters
alphanumeric({String? message}) String? Function(String?)
Validates alphanumeric characters
bankAccount({String? message}) String? Function(String?)
Validates bank account number
birthDate({String? message}) String? Function(String?)
Validates birth date (format DD/MM/YYYY or YYYY-MM-DD)
combine(List<String? Function(String?)> validators) String? Function(String?)
Combines multiple validators
email({String? message}) String? Function(String?)
Validates email format
idCard({String? message}) String? Function(String?)
Validates identification number (general)
ktp({String? message}) String? Function(String?)
Validates KTP (Indonesian ID Card)
maxLength(int maxLength, {String? message}) String? Function(String?)
Validates maximum length
minLength(int minLength, {String? message}) String? Function(String?)
Validates minimum length
nik({String? message}) String? Function(String?)
Validates NIK (Indonesian ID Number)
nip({String? message}) String? Function(String?)
Validates employee ID (NIP)
nisn({String? message}) String? Function(String?)
Validates NISN (National Student ID Number)
numeric({String? message}) String? Function(String?)
Validates only numbers
password({String? message}) String? Function(String?)
Validates password strength
phoneNumber({String? message}) String? Function(String?)
Validates phone number format
postalCode({String? message}) String? Function(String?)
Validates postal code
required({String? message}) String? Function(String?)
Validates if the field is empty
setDefaultMessages(Map<String, String> messages) → void
Sets default messages for a specific language
sim({String? message}) String? Function(String?)
Validates SIM card number
url({String? message}) String? Function(String?)
Validates URL format