ValidationContextExtensions Class
Extensions of ValidationResult and IValidatableObject, returning a ValidationContext.
Namespace
Songhay.Extensions
Base Types
  • object
graph BT Type-->Base0["object"] Type["ValidationContextExtensions"] class Type type-node

Syntax

public static class ValidationContextExtensions

Remarks

The use of these methods should be the last resort after deferring to a NuGet package like FluentValidation.

Methods

Name Return Value Summary
ToDisplayText(IEnumerable<ValidationResult>?) string
Converts the IEnumerable<ValidationResult> into a display text.
static
ToDisplayText(ValidationResult?) string
Converts the ValidationResult into a display text.
static
ToValidationContext(IValidatableObject) ValidationContext
Converts the Object into a validation context.
static
ToValidationResults(IValidatableObject?, bool, ValidationContext?) IEnumerable<ValidationResult>
Converts the Object into a validation results.
static
ToValidationResults(IValidatableObject?, string, object, ValidationContext?) IEnumerable<ValidationResult>
Converts the Object into a validation results.
static
ToValidationResults(IValidatableObject?, string, object) IEnumerable<ValidationResult>
Converts the Object into a validation results.
static
ToValidationResults(IValidatableObject?, ValidationContext?) IEnumerable<ValidationResult>
Converts the Object into a validation results.
static
ToValidationResults(IValidatableObject?) IEnumerable<ValidationResult>
Converts the Object into a validation results.
static