Skip to content

Commit 8f9c5e1

Browse files
committed
[Fix] Fixed questions that are not validated if they do not have an answer.
1 parent e3882d4 commit 8f9c5e1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/model/ValidationProcessor.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ export default class ValidationProcessor {
1111
* @param {Object} intl - The object used for internationalization.
1212
*/
1313
static updateQuestionValidation = (questions, question, index, intl) => {
14-
if (question[Constants.HAS_ANSWER]) {
15-
const validator = createValidator(question, intl);
16-
const update = validator();
14+
const validator = createValidator(question, intl);
15+
const update = validator();
1716

18-
if (update) {
19-
questions[index] = { ...question, ...update };
20-
}
17+
if (update) {
18+
questions[index] = { ...question, ...update };
2119
}
2220
for (const question of questions) {
2321
this.updateSubQuestionsValidation(question, intl);

0 commit comments

Comments
 (0)