Interface IHostsValidationFramework
An object which hosts a validation framework in a self-contained manner, for applications which do not use dependency injection.
Namespace: CSF.Validation
Assembly: CSF.Validation.Selfhosting.dll
Syntax
public interface IHostsValidationFramework
Remarks
The recommended way in which to consume the CSF.Validation framework is via dependency injection, in which case the types within this assembly/package are not required.
This interface acts as a root object providing access to the the entry-points into the validation framework.
Properties
| Improve this Doc View SourceJsonSerializer
Gets an object which may be used to serialize instances of manifest model Value to/from JSON.
Declaration
ISerializesManifestModelToFromJson JsonSerializer { get; }
Property Value
Type | Description |
---|---|
ISerializesManifestModelToFromJson |
ManifestFromBuilderProvider
Gets an object which may provide a ValidationManifest from a validator-builder.
Declaration
IGetsManifestFromBuilder ManifestFromBuilderProvider { get; }
Property Value
Type | Description |
---|---|
IGetsManifestFromBuilder |
Remarks
Validator builders are types which implement IBuildsValidator<TValidated> and specify the definition/configuration of a validator in code. This is the recommended way of specifying validators.
ManifestFromModelProvider
Gets an object which may provide a ValidationManifest from a manifest model.
Declaration
IGetsValidationManifestFromModel ManifestFromModelProvider { get; }
Property Value
Type | Description |
---|---|
IGetsValidationManifestFromModel |
Remarks
The manifest model is a simplified API, similar to a validation manifest but suitable for serializing to/from data such as relational databases or document structures such as JSON or XML. This provides a mechanism for specifying validators-as-data. validators.
ManifestValidator
Gets an object which may be used to validate a validation manifest.
Declaration
IValidatesValidationManifest ManifestValidator { get; }
Property Value
Type | Description |
---|---|
IValidatesValidationManifest |
Remarks
This is essentially "a validator-validator". Particularly of use if you are manipulating validation manifests directly, or if you are using the manifest model. It allows developers to test their validators for common mistakes.
ValidatorFactory
Gets an object from which validator instances may be created.
Declaration
IGetsValidator ValidatorFactory { get; }
Property Value
Type | Description |
---|---|
IGetsValidator |
Remarks
This is the primary property of use provided by IHostsValidationFramework. From here you may create validator instances from any of:
- Validator builders
- A validation manifest model
- A validation manifest
Validator builders are the recommended mechanism for creating validators. For more information please read the documentation website.