zhaolei
2020-11-20 921de2254ff5712a44ed8575ee8efe34252f6603
commit | author | age
921de2 1 using System.Collections.Generic;
Z 2 using System.ComponentModel.DataAnnotations;
3
4 namespace Bootstrap.Admin.Pages.Components
5 {
6     /// <summary>
7     /// IValidComponent 接口
8     /// </summary>
9     public interface IValidateComponent
10     {
11         /// <summary>
12         /// 数据验证方法
13         /// </summary>
14         /// <param name="propertyValue"></param>
15         /// <param name="context"></param>
16         /// <param name="results"></param>
17         void ValidateProperty(object? propertyValue, ValidationContext context, List<ValidationResult> results);
18
19         /// <summary>
20         /// 显示或者隐藏提示信息方法
21         /// </summary>
22         /// <param name="results"></param>
23         /// <param name="validProperty"></param>
24         void ToggleMessage(IEnumerable<ValidationResult> results, bool validProperty);
25     }
26 }