File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44"""
55
66import re
7+
8+ from enum import Enum
9+
710from . import dtypes
811
912LABEL_ERROR = 'error'
1013LABEL_WARNING = 'warning'
1114
1215
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+
1350class ValidationError (object ):
1451 """
1552 Represents an error found in the validation process.
You can’t perform that action at this time.
0 commit comments