File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 4
4
"""
5
5
6
6
import re
7
+
8
+ from enum import Enum
9
+
7
10
from . import dtypes
8
11
9
12
LABEL_ERROR = 'error'
10
13
LABEL_WARNING = 'warning'
11
14
12
15
16
+ class ValidationID (Enum ):
17
+ """
18
+ IDs identifying registered validation handlers.
19
+ """
20
+ unspecified = 1
21
+
22
+ # Required attributes validations
23
+ object_required_attributes = 10
24
+ section_type_must_be_defined = 11
25
+
26
+ # Unique id, name and type validations
27
+ section_unique_ids = 20
28
+ property_unique_ids = 21
29
+ section_unique_name_type = 22
30
+ property_unique_name = 23
31
+
32
+ # Good form validations
33
+ object_name_readable = 30
34
+
35
+ # Property specific validations
36
+ property_terminology_check = 40
37
+ property_dependency_check = 41
38
+ property_values_check = 42
39
+ property_values_string_check = 43
40
+
41
+ # Cardinality validations
42
+ section_properties_cardinality = 50
43
+ section_sections_cardinality = 51
44
+ property_values_cardinality = 52
45
+
46
+ # Optional validations
47
+ section_repository_present = 60
48
+
49
+
13
50
class ValidationError (object ):
14
51
"""
15
52
Represents an error found in the validation process.
You can’t perform that action at this time.
0 commit comments