Compartilhar via


EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation Método

Definição

Sobrecargas

EnableDataAnnotationsValidation(EditContext)
Obsoleto.

Habilita o suporte à validação dataannotations para o EditContext.

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

Habilita o suporte à validação dataannotations para o EditContext.

EnableDataAnnotationsValidation(EditContext)

Origem:
EditContextDataAnnotationsExtensions.cs
Origem:
EditContextDataAnnotationsExtensions.cs
Origem:
EditContextDataAnnotationsExtensions.cs
Origem:
EditContextDataAnnotationsExtensions.cs

Cuidado

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

Habilita o suporte à validação dataannotations para o 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

O EditContext.

Retornos

Um objeto descartável cujo descarte removerá o suporte à validação DataAnnotations do EditContext.

Atributos

Aplica-se a

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

Origem:
EditContextDataAnnotationsExtensions.cs
Origem:
EditContextDataAnnotationsExtensions.cs
Origem:
EditContextDataAnnotationsExtensions.cs

Habilita o suporte à validação dataannotations para o 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

O EditContext.

serviceProvider
IServiceProvider

O IServiceProvider a ser usado no ValidationContext.

Retornos

Um objeto descartável cujo descarte removerá o suporte à validação DataAnnotations do EditContext.

Aplica-se a