Validator.ValidateValue 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.
Validates the specified attributes.
public:
static void ValidateValue(System::Object ^ value, System::ComponentModel::DataAnnotations::ValidationContext ^ validationContext, System::Collections::Generic::IEnumerable<System::ComponentModel::DataAnnotations::ValidationAttribute ^> ^ validationAttributes);
public static void ValidateValue (object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationAttribute> validationAttributes);
public static void ValidateValue (object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationAttribute> validationAttributes);
static member ValidateValue : obj * System.ComponentModel.DataAnnotations.ValidationContext * seq<System.ComponentModel.DataAnnotations.ValidationAttribute> -> unit
Public Shared Sub ValidateValue (value As Object, validationContext As ValidationContext, validationAttributes As IEnumerable(Of ValidationAttribute))
Parameters
- value
- Object
The value to validate.
- validationContext
- ValidationContext
The context that describes the object to validate.
- validationAttributes
- IEnumerable<ValidationAttribute>
The validation attributes.
Exceptions
The validationContext
parameter is null
.
The value
parameter does not validate with the validationAttributes
parameter.
Remarks
This method tests each validation attribute in the validationAttributes
parameter against the value
parameter. If a RequiredAttribute attribute is included, the RequiredAttribute attribute is evaluated first.
Applies to
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示