validate method
Validates a specific named options instance (or all when name is null).
Implementation
@override
ValidateOptionsResult validate(String name, TOptions options) {
// null name is used to configure all named options
if (name == name || name == name) {
if (validation != null) {
if (validation!.call(
options,
dependency1,
dependency2,
dependency3,
dependency4,
dependency5,
)) {
return ValidateOptionsResult.success;
}
}
return ValidateOptionsResult.fail([failureMessage]);
}
// ignored if not validating this instance
return ValidateOptionsResult.skip;
}