Validation
Valid vs invalid queries
Lantern validates the entire query tree on every change. The Details tab shows Valid or an error count. Execute on the Results tab is blocked until the query is valid.
What stays valid
A query is Valid when every group and condition passes all checks below. Preview (SQL/Mongo/GraphQL) still updates even when invalid — incomplete rules are simply skipped in the generated string.
Tree-level errors
- No conditions — root group is empty (“Add at least one condition”)
- Empty nested group — a group with zero children
Condition-level errors
| Situation | Message |
|---|---|
| Field not selected | Select a field |
| Wrong operator for field type | e.g. Contains on a number field |
| Missing value | Value is required |
| Between without end value | End value is required for between |
| Invalid range | Range start must be ≤ end |
| Empty In Array list | Provide at least one value |
| Non-numeric value on number field | Value must be a number |
| Bad regex pattern | Invalid regular expression |
Null checks
Is Null and Is Not Null do not require a value. A rule like Email → Is Null can be valid with only the field and operator set.
Demo tip
To show validation in action:
- Clear the field dropdown on a condition → Status shows errors
- Pick Contains on a number field → operator/type error
- Add a nested group and delete all rules inside → empty group error
- Fix the issues → Status returns to Valid and Execute works