Validators class

Pure Dart form 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

cableLength(String? value) String?
Validates cable length (must be positive)
cableSection(String? value) String?
Validates cable section (common values: 1.5, 2.5, 4, 6, 10, 16, etc.)
combine(String? value, List<String? Function(String?)> validators) String?
Combines multiple validators Returns first error found, or null if all pass
current(String? value) String?
Validates current (must be positive)
email(String? value) String?
Validates email format Returns error message if invalid, null if valid
integer(String? value) String?
Validates integer
nonNegativeNumber(String? value) String?
Validates non-negative number (>= 0)
positiveNumber(String? value) String?
Validates positive number (> 0)
power(String? value) String?
Validates power (must be positive)
powerFactor(String? value) String?
Validates power factor (0.1 to 1.0)
range(String? value, double min, double max) String?
Validates number within range `min`, `max`
required(String? value, {String fieldName = 'Este campo'}) String?
Validates that field is not empty fieldName is used in error message
voltage(String? value) String?
Validates voltage (must be positive)