Condition Stage
The Condition stage is the first step in the Pipe lifecycle. It is responsible for validating the fundamental integrity of the data, such as its type, presence, size, and basic constraints.
Execution Rule
If a condition fails, the pipe execution will not stop immediately. It will evaluate every condition to gather all errors. However, certain conditions have a special flag ConditionFlag.BREAK_PIPE_LOOP_ON_ERROR (such as Condition.ValueType) that breaks the loop upon an error.
Technical Reference
The following section is automatically generated from the source code, detailing the available condition handlers and their configurations.
Condition
Registry for all condition handlers.
This class groups all available condition handlers (e.g., ValueType, MinLength, Equal) for easy access.
Source code in pipeline/handlers/condition_handler/condition.py
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
DoesNotMatchField
Bases: ConditionHandler[Any, Any]
Validates that the current value does not match the value of another field in the context (e.g., new password != old password)
Source code in pipeline/handlers/condition_handler/condition.py
157 158 159 160 161 162 163 164 165 166 167 168 | |
Equal
Bases: ConditionHandler[Any, Any]
Ensures the value is strictly equal to the argument or a specific context field
Source code in pipeline/handlers/condition_handler/condition.py
121 122 123 124 125 126 127 128 129 130 131 | |
IncludedIn
Bases: ConditionHandler[Any, Iterable]
Ensures the value exists within the provided Iterable
Source code in pipeline/handlers/condition_handler/condition.py
95 96 97 98 99 100 101 102 103 104 105 106 | |
MatchesField
Bases: ConditionHandler[Any, Any]
Validates that the current value matches the value of another field in the context (e.g., password confirmation)
Source code in pipeline/handlers/condition_handler/condition.py
145 146 147 148 149 150 151 152 153 154 155 | |
MaxLength
Bases: ConditionHandler[str | list | dict, int]
Ensures the collection or string does not exceed N items/characters
Source code in pipeline/handlers/condition_handler/condition.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
MaxNumber
Bases: ConditionHandler[int | float, int | float]
Ensures the numeric value is less than or equal to N
Source code in pipeline/handlers/condition_handler/condition.py
84 85 86 87 88 89 90 91 92 93 | |
MinLength
Bases: ConditionHandler[str | list | dict, int]
Ensures the collection or string has at least N items/characters
Source code in pipeline/handlers/condition_handler/condition.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
MinNumber
Bases: ConditionHandler[int | float, int | float]
Ensures the numeric value is greater than or equal to N
Source code in pipeline/handlers/condition_handler/condition.py
72 73 74 75 76 77 78 79 80 81 82 | |
NotEqual
Bases: ConditionHandler[Any, Any]
Ensures the value is strictly not equal to the argument or a specific context field
Source code in pipeline/handlers/condition_handler/condition.py
133 134 135 136 137 138 139 140 141 142 143 | |
NotIncludedIn
Bases: ConditionHandler[Any, Iterable]
Ensures the value does not exist within the provided blacklist
Source code in pipeline/handlers/condition_handler/condition.py
108 109 110 111 112 113 114 115 116 117 118 119 | |
Pipeline
Bases: ConditionHandler[dict, Pipeline]
Validates a dictionary using the same rules as the normal pipeline, but for nested data.
Source code in pipeline/handlers/condition_handler/condition.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
ValueType
Bases: ConditionHandler[Any, type]
A built-in condition handler to validate the type of the value.
This handler is automatically used by the Pipe to ensure the passed value matches the expected type defined in the Pipe.
Source code in pipeline/handlers/condition_handler/condition.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |