语言

EditContext.IsValidationFaulted 方法

定义

重载

名称 说明
IsValidationFaulted()

如果 true 最近的表单级传递出错(注册的验证任务引发),而不是仅仅生成验证消息,则返回。 随后成功的传递将清除它;调用方取消的 ValidateAsync(CancellationToken) 传递会保留它。 对于每个字段故障, IsValidationFaulted(FieldIdentifier) 请使用重载。

IsValidationFaulted(FieldIdentifier)

如果 true 指定的字段的最后一个异步验证出错(引发非取消异常),则返回。

IsValidationFaulted<TField>(Expression<Func<TField>>)

返回 true 表达式最后一次异步验证错误标识 accessor 的字段(引发非取消异常)。

IsValidationFaulted()

Source:
EditContext.cs

如果 true 最近的表单级传递出错(注册的验证任务引发),而不是仅仅生成验证消息,则返回。 随后成功的传递将清除它;调用方取消的 ValidateAsync(CancellationToken) 传递会保留它。 对于每个字段故障, IsValidationFaulted(FieldIdentifier) 请使用重载。

public bool IsValidationFaulted();
member this.IsValidationFaulted : unit -> bool
Public Function IsValidationFaulted () As Boolean

返回

true 如果最近验证通过错误,则为 ;否则 false。

适用于

IsValidationFaulted(FieldIdentifier)

Source:
EditContext.cs

如果 true 指定的字段的最后一个异步验证出错(引发非取消异常),则返回。

public bool IsValidationFaulted(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier);
member this.IsValidationFaulted : FieldIdentifier -> bool
Public Function IsValidationFaulted (ByRef fieldIdentifier As FieldIdentifier) As Boolean

参数

fieldIdentifier
FieldIdentifier

标识要查询的字段。

返回

true 如果字段的最后一个异步验证出错,则为 ;否则 false。

适用于

IsValidationFaulted<TField>(Expression<Func<TField>>)

Source:
EditContext.cs

返回 true 表达式最后一次异步验证错误标识 accessor 的字段(引发非取消异常)。

public bool IsValidationFaulted<TField>(System.Linq.Expressions.Expression<Func<TField>> accessor);
member this.IsValidationFaulted : System.Linq.Expressions.Expression<Func<'Field>> -> bool
Public Function IsValidationFaulted(Of TField) (accessor As Expression(Of Func(Of TField))) As Boolean

类型参数

TField

字段的类型。

参数

accessor
Expression<Func<TField>>

标识字段的表达式,例如 () => model.Email。

返回

true 如果字段的最后一个异步验证出错,则为 ;否则 false。

适用于