EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
EnableDataAnnotationsValidation(EditContext) |
已淘汰.
啟用 的 EditContext DataAnnotations 驗證支援。 |
EnableDataAnnotationsValidation(EditContext, IServiceProvider) |
啟用 的 EditContext DataAnnotations 驗證支援。 |
EnableDataAnnotationsValidation(EditContext)
警告
This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.
啟用 的 EditContext DataAnnotations 驗證支援。
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
參數
- editContext
- EditContext
傳回
處置的可處置物件將會從 EditContext 移除 DataAnnotations 驗證支援。
- 屬性
適用於
EnableDataAnnotationsValidation(EditContext, IServiceProvider)
啟用 的 EditContext DataAnnotations 驗證支援。
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
參數
- editContext
- EditContext
- serviceProvider
- IServiceProvider
傳回
處置的可處置物件將會從 EditContext 移除 DataAnnotations 驗證支援。