Bahasa

EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation Metode

Definisi

Overload

Nama Deskripsi
EnableDataAnnotationsValidation(EditContext)
Kedaluwarsa.

Mengaktifkan dukungan validasi DataAnnotations untuk EditContext.

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

Mengaktifkan dukungan validasi DataAnnotations untuk EditContext.

EnableDataAnnotationsValidation(EditContext)

Sumber:
EditContextDataAnnotationsExtensions.cs
Sumber:
EditContextDataAnnotationsExtensions.cs
Sumber:
EditContextDataAnnotationsExtensions.cs
Sumber:
EditContextDataAnnotationsExtensions.cs

Perhatian

This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.

Mengaktifkan dukungan validasi DataAnnotations untuk EditContext.

public static IDisposable EnableDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext);
[System.Obsolete("This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.")]
public static IDisposable EnableDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext);
static member EnableDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext -> IDisposable
[<System.Obsolete("This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.")>]
static member EnableDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext -> IDisposable
<Extension()>
Public Function EnableDataAnnotationsValidation (editContext As EditContext) As IDisposable

Parameter

editContext
EditContext

EditContext.

Mengembalikan

Objek sekali pakai yang pembuangannya akan menghapus dukungan validasi DataAnnotations dari EditContext.

Atribut

Berlaku untuk

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

Sumber:
EditContextDataAnnotationsExtensions.cs
Sumber:
EditContextDataAnnotationsExtensions.cs
Sumber:
EditContextDataAnnotationsExtensions.cs

Mengaktifkan dukungan validasi DataAnnotations untuk EditContext.

public static IDisposable EnableDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext, IServiceProvider serviceProvider);
static member EnableDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext * IServiceProvider -> IDisposable
<Extension()>
Public Function EnableDataAnnotationsValidation (editContext As EditContext, serviceProvider As IServiceProvider) As IDisposable

Parameter

editContext
EditContext

EditContext.

serviceProvider
IServiceProvider

yang IServiceProvider akan digunakan dalam ValidationContext.

Mengembalikan

Objek sekali pakai yang pembuangannya akan menghapus dukungan validasi DataAnnotations dari EditContext.

Berlaku untuk