Attribute
Dosaic.Plugins.Validations.AttributeValidation is a plugin
that allows other Dosaic components
to validate object using attributes
.
Installation
To install the nuget package follow these steps:
or add as package reference to your .csproj
Appsettings.yml
You do not need to configure anything, because the implementation resolver, does this automatically at startup.
Usage
The validator is auto-registered using the Plugin technology. You can use it by adding the Validations
attribute to your model and inject the IValidator in your usage.
However, there are following Validations attibutes:
Required
Expression
Array
Length
MinLength
MaxLength
Bool
True
False
Date
Before
After
Age
MinAge
MaxAge
Int
Range
Min
Max
Positive
Negative
String
Length
MinLength
MaxLength
Email
Url
Regex
Last updated