You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method validateAnswer in controller.ts use utils.ensureArray to make sure that user's answer is an array to then iterate this resulted list in all rule's validators.
When a Type implements multiple executors with custom validator to each one of them it could face a "skip validation" of some executor depending on what transformation you do.
In the case of StringSearch type the first transformation get the server result and transforms it to a list of objects in the following shape: { label, value }. When server response is an empty array, the controller tries to iterate an empty string between the registered validators and them it doesn't behaves like expected because an empty array isn't iterated at all.
Suggested solution: each executor's transformation shall validate their own output if you're manipulating user's input into array
The text was updated successfully, but these errors were encountered:
Method
validateAnswer
incontroller.ts
useutils.ensureArray
to make sure that user's answer is an array to then iterate this resulted list in all rule's validators.When a Type implements multiple executors with custom validator to each one of them it could face a "skip validation" of some executor depending on what transformation you do.
In the case of StringSearch type the first transformation get the server result and transforms it to a list of objects in the following shape:
{ label, value }
. When server response is an empty array, the controller tries to iterate an empty string between the registered validators and them it doesn't behaves like expected because an empty array isn't iterated at all.Suggested solution: each executor's transformation shall validate their own output if you're manipulating user's input into array
The text was updated successfully, but these errors were encountered: