Skip to content

Commit

Permalink
Create validation for SliderRow
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Riabkov committed Apr 9, 2024
1 parent b1e80b8 commit bc4ea3f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/widgets/ActivityDetails/model/validateItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ function isAnswerEmpty(item: appletModel.ItemRecord): boolean {
return item.answer.every((value) => value !== null);
}

if (item.responseType === 'sliderRows') {
if (item.answer === null || item.answer.length === 0) return false;

return item.answer.every((value) => value !== null);
}

return item.answer.length > 0;
}

Expand Down

0 comments on commit bc4ea3f

Please sign in to comment.