INotifyDataErrorInfo.HasErrors 属性

定义

获取一个值,该值指示实体是否包含验证错误。Gets a value that indicates whether the entity has validation errors.

public:
 property bool HasErrors { bool get(); };
public bool HasErrors { get; }
member this.HasErrors : bool
Public ReadOnly Property HasErrors As Boolean

属性值

Boolean

如果实体当前具有验证错误,则为 true;否则为 falsetrue if the entity currently has validation errors; otherwise, false.

注解

false如果实体在访问时没有已知的实体级或属性级验证错误,则此属性返回。This property returns false if there are no known entity-level or property-level validation errors for the entity at the time it is accessed. 但是,某些验证规则可能仍会按照方法的说明异步运行 GetErrorsHowever, some validation rules may still be running asynchronously as described for the GetErrors method.

适用于