validators/contextual library

Functions

resolve(IValidator? resolver(Map parentObject)) ResolveValidator
Creates a provider validator that depends on the parent object.
switchBy(String key, Map<String, IValidator> by) IValidator
Creates a polymorphic (switch-case) validator that depends on the value of a key in the parent map.
when(IValidator condition, {required IValidator then, required IValidator otherwise, String? message}) IValidator
Creates a conditional validator. It's conditional based on some other field in the eskema.