ZenithValidator<T> class
abstract
Abstract base validator class for fluent model validation.
Equivalent to FluentValidation in .NET.
class SignupValidator extends ZenithValidator<SignupForm> {
SignupValidator() {
ruleFor((f) => f.email, 'email').notEmpty().email();
}
}
Constructors
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
-
ruleFor<
V> (V selector(T model), String propertyName) → PropertyRuleBuilder< T, V> - Registers a property rule selector and name.
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
T model) → ValidationResult -
Validates
modelagainst all registered rules.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited