CONSOLIDATED - POSITIVE
Description
The POSITIVE validator is designed to ensure that a field's value is greater than zero. This validator is particularly useful for data validation in scenarios where positive values are considered valid or an error. It supports all numeric data types, making it versatile for various data validation needs.
Config Location
To configure the POSITIVE validator, you need to define it within the consDPValidators
section of your data point configuration within the schema. This involves specifying the validator name and entity.
Supported Data Types
- Double
- Decimal
- Integer
Config Requirements
Config (
Example Config
Below is an example of how to configure the POSITIVE validator in XML format. This example demonstrates a validator that checks if the "QUANTITY" data point is greater than zero.
1 2 3 4 5 |
|
Example Result
Upon successful configuration and execution, the POSITIVE validator will check the current "QUANTITY" value to ensure it is greater than zero. If the value is not positive, a violation will be triggered, indicating that the value does not meet the criteria for acceptability.
Common Mistakes
- Ensure that the validator name and entity are correctly defined in the configuration to ensure that the validator is correctly identified and applied during the data processing pipeline.
- Remember that the POSITIVE validator does not require any configuration. If you attempt to provide a
<config>
block, it will be ignored.