Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Installation

Install-Package FluentOptionsValidation

Intro

I recently had to validate a configuration file on startup, so I thought why not use precious FluentValidation for it. This simple library doesn't do much except use the IStartupFilter to run the validations.

Configuration

You can pass an Action<FluentOptionsConfiguration> to ConfigureFluentOptions to configure whether a failed configuration should abort the startup of the service.

Usage

The repository contains a Sample Application which showcases its usage

Declare your Settings and Validator classes as usual.

Validator

Then just inject them using the ConfigureFluentOptions extension

Injection

Note:

You still have to add the FluentValidation validators yourself to the service container.

License

MIT

About

An extension to FluentValidation for your configuration validation

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages