Compartir a través de


EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation Método

Definición

Sobrecargas

EnableDataAnnotationsValidation(EditContext)
Obsoletos.

Habilita la compatibilidad con la validación de DataAnnotations para .EditContext

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

Habilita la compatibilidad con la validación de DataAnnotations para .EditContext

EnableDataAnnotationsValidation(EditContext)

Source:
EditContextDataAnnotationsExtensions.cs
Source:
EditContextDataAnnotationsExtensions.cs
Source:
EditContextDataAnnotationsExtensions.cs
Source:
EditContextDataAnnotationsExtensions.cs

Precaución

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

Habilita la compatibilidad con la validación de DataAnnotations para .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

Parámetros

editContext
EditContext

EditContext.

Devoluciones

Objeto descartable cuya eliminación quitará la compatibilidad de validación de DataAnnotations de EditContext.

Atributos

Se aplica a

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

Source:
EditContextDataAnnotationsExtensions.cs
Source:
EditContextDataAnnotationsExtensions.cs
Source:
EditContextDataAnnotationsExtensions.cs

Habilita la compatibilidad con la validación de DataAnnotations para .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

Parámetros

editContext
EditContext

EditContext.

serviceProvider
IServiceProvider

que IServiceProvider se va a usar en .ValidationContext

Devoluciones

Objeto descartable cuya eliminación quitará la compatibilidad de validación de DataAnnotations de EditContext.

Se aplica a