Field Logic Error Handling - frontend (#162)

* Field Logic Error Handling - frontend

* Fix test case

* fix expected_type for multi select

* fix variable

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2023-08-30 16:58:52 +05:30
committed by GitHub
parent ec26c211d6
commit 057bfde8b7
6 changed files with 184 additions and 11 deletions

View File

@@ -34,7 +34,22 @@ it('can validate form logic rules for actions', function () {
'hidden' => true,
'required' => false,
'logic' => [
"conditions" => null,
"conditions" => [
"operatorIdentifier"=> "and",
"children"=> [
[
"identifier"=> "title",
"value"=> [
"operator"=> "equals",
"property_meta"=> [
"id"=> "title",
"type"=> "text"
],
"value"=> "TEST"
]
]
]
],
"actions" => ['hide-block']
]
]
@@ -51,7 +66,22 @@ it('can validate form logic rules for actions', function () {
'name' => "Custom Test",
'type' => 'nf-text',
'logic' => [
"conditions" => null,
"conditions" => [
"operatorIdentifier"=> "and",
"children"=> [
[
"identifier"=> "title",
"value"=> [
"operator"=> "equals",
"property_meta"=> [
"id"=> "title",
"type"=> "text"
],
"value"=> "TEST"
]
]
]
],
"actions" => ['require-answer']
]
]
@@ -93,7 +123,7 @@ it('can validate form logic rules for conditions', function () {
]
]
],
"actions" => []
"actions" => ['hide-block']
]
]
]
@@ -126,7 +156,7 @@ it('can validate form logic rules for conditions', function () {
]
]
],
"actions" => []
"actions" => ['hide-block']
]
]
]
@@ -160,7 +190,7 @@ it('can validate form logic rules for conditions', function () {
]
]
],
"actions" => []
"actions" => ['hide-block']
]
]
]