Skip to main content

Kandra.Validators

Kandra.Validators.Dictionaries.DictionaryValidator<T0>​

Base validator for dictionary records.

Constructors​

ConstructorDescription
DictionaryValidator(IStringLocalizer)Creates the validator with the given string localizer for the error messages.

Kandra.Validators.Documents.DocumentValidator<T0>​

Base validator for document records.

Constructors​

ConstructorDescription
DocumentValidator(IStringLocalizer)Creates the validator with the given string localizer for the error messages.

Kandra.Validators.ValidationContextExtensions​

Extension methods that read the flags of a validation context.

Methods​

MethodDescription
IsCreate<T0>(ValidationContext<T0>)Gets a value that indicates whether the record is being created. Returns: true when the record is being created; otherwise, false.
IsOnServer<T0>(ValidationContext<T0>)Gets a value that indicates whether the validation runs on the server. Returns: true when the validation runs on the server; otherwise, false.