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:
@@ -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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user