EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
| Nama | Deskripsi |
|---|---|
| EnableDataAnnotationsValidation(EditContext) |
Kedaluwarsa.
Mengaktifkan dukungan validasi DataAnnotations untuk EditContext. |
| EnableDataAnnotationsValidation(EditContext, IServiceProvider) |
Mengaktifkan dukungan validasi DataAnnotations untuk EditContext. |
EnableDataAnnotationsValidation(EditContext)
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
Mengembalikan
Objek sekali pakai yang pembuangannya akan menghapus dukungan validasi DataAnnotations dari EditContext.
- Atribut
Berlaku untuk
EnableDataAnnotationsValidation(EditContext, IServiceProvider)
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
- serviceProvider
- IServiceProvider
yang IServiceProvider akan digunakan dalam ValidationContext.
Mengembalikan
Objek sekali pakai yang pembuangannya akan menghapus dukungan validasi DataAnnotations dari EditContext.