Add 'exists_in_submissions' and 'does_not_exist_in_submissions' valid… (#725)

* Add 'exists_in_submissions' and 'does_not_exist_in_submissions' validation conditions

- Implement new validation conditions in FormLogicConditionChecker to check for existing submissions.
- Update open_filters.json and client-side filters to include the new conditions.
- Enhance FormLogicTest with test cases for the new validation conditions.
- Modify UI components to support the new logic conditions in form validation.

* Fix FormLogicConditionChecker

* Improve custom_validation_only

* fix test

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2025-03-25 16:20:59 +05:30
committed by GitHub
parent 2c746437c9
commit fba2207e0f
7 changed files with 329 additions and 8 deletions

View File

@@ -66,6 +66,22 @@
"format": {
"type": "regex"
}
},
"exists_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
},
"does_not_exist_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
}
}
},
@@ -136,6 +152,22 @@
"format": {
"type": "regex"
}
},
"exists_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
},
"does_not_exist_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
}
}
},
@@ -206,6 +238,22 @@
"format": {
"type": "regex"
}
},
"exists_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
},
"does_not_exist_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
}
}
},
@@ -276,6 +324,22 @@
"format": {
"type": "regex"
}
},
"exists_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
},
"does_not_exist_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
}
}
},
@@ -362,6 +426,22 @@
},
"content_length_less_than_or_equal_to": {
"expected_type": "number"
},
"exists_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
},
"does_not_exist_in_submissions": {
"expected_type": "boolean",
"format": {
"type": "enum",
"values": [true]
},
"custom_validation_only": true
}
}
},