validateOnStart method
OptionsBuilder<TOptions>
validateOnStart()
Implementation
OptionsBuilder<TOptions> validateOnStart() {
services.addTransient<StartupValidator>(
(services) => StartupValidator(
validators: services.getService<Options<StartupValidatorOptions>>()!,
),
);
services
.addOptions<StartupValidatorOptions>(StartupValidatorOptions.new)
.configure1<OptionsMonitor<TOptions>>((vo, options) => vo.validators);
return this;
}