Validator.TryValidateValueAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static System.Threading.Tasks.Task<bool> TryValidateValueAsync(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection<System.ComponentModel.DataAnnotations.ValidationResult>? validationResults, System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationAttribute> validationAttributes, System.Threading.CancellationToken cancellationToken = default);
static member TryValidateValueAsync : obj * System.ComponentModel.DataAnnotations.ValidationContext * System.Collections.Generic.ICollection<System.ComponentModel.DataAnnotations.ValidationResult> * seq<System.ComponentModel.DataAnnotations.ValidationAttribute> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Shared Function TryValidateValueAsync (value As Object, validationContext As ValidationContext, validationResults As ICollection(Of ValidationResult), validationAttributes As IEnumerable(Of ValidationAttribute), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- value
- Object
- validationContext
- ValidationContext
- validationResults
- ICollection<ValidationResult>
- validationAttributes
- IEnumerable<ValidationAttribute>
- cancellationToken
- CancellationToken