Simple, browser-based tool for creating logical conditions for internal
Condition Builder with Validation & Live Test
This project provides a simple, browser-based tool for creating logical conditions with placeholder variables (e.g., {ConnectionPower} >= 100). It allows users to generate condition strings, check them for logical conflicts or invalid values, and test them interactively against input data.
๐ Features
- Add multiple conditions with:
- Field selection (e.g., ConnectionPower, Consumption)
- Logical operators (
>, >=, <, <=, ==)
- Numeric value entry
- ๐ Conditions are combined with
&& in the output
- โ Automatic validation:
- No negative values allowed
- Contradictory conditions are detected
- โ
Live test:
- Enter test values to check if all conditions pass
- Result shown as
TRUE or FALSE with explanation
- ๐ One-click copy to clipboard
- ๐ Reset all inputs and outputs with a single button
- ๐ Output hint above result (not copied)
๐ Usage
- Open
bedingungen-tool.html in any modern browser.
- Click โโ Add Conditionโ and configure one or more rules.
- Press โโ
Generate Conditionsโ to see the condition string.
- Use โ๐งช Checkโ to test values against the current condition set.
- Use โ๐ Copy to Clipboardโ to export the condition string.
๐ ๏ธ Customization
You can easily:
- Add more fields (e.g., Temperature, Pressure)
- Extend validation rules
- Modify placeholders (
{...}) or output format
๐ License
MIT License โ free to use, modify and share.