-
Notifications
You must be signed in to change notification settings - Fork 0
/
MultiPropertyValidationRule.cs
52 lines (42 loc) · 1.29 KB
/
MultiPropertyValidationRule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using FFP.CoreUtilities;
using System;
using System.Collections.Generic;
namespace FFP.Validations
{
[Serializable()]
public class MultiPropertyValidationRule : ValidationRule
{
public MultiPropertyValidationRule(string Validation, string Description) : base(Validation, Description)
{
}
public MultiPropertyValidationRule(string Validation, string Description, string Property) : base(Validation, Description, Property)
{
}
public MultiPropertyValidationRule(string Validation, string Description, string Property, ValidationHandler handler) : base(Validation, Description, Property, handler)
{
}
private List<string> lvProperties = new List<string>();
public List<string> Properties
{
get
{
return lvProperties;
}
}
public override object AllowedValue
{
get
{
return base.AllowedValue;
}
set
{
base.AllowedValue = value;
}
}
public override bool HandlesProperty(string propName)
{
return base.HandlesProperty(propName) || this.Properties.ContainsAbsolute(propName);
}
}
}