Skip to content

Commit

Permalink
[new] util to check question for validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Aug 4, 2017
1 parent 030098e commit edb1c3e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/util/FormUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ export default class FormUtils {
return true;
}

static hasValidationLogic(question) {
if (question[Constants.REQUIRES_ANSWER_VALUE]) {
return true;
}
if (question[Constants.REQUIRES_ANSWER]) {
return true;
}
if (question[Constants.REQUIRES_ANSWER_IF]) {
return true;
}
return false;
}

static isValid(question) {
var subQ;

Expand Down

0 comments on commit edb1c3e

Please sign in to comment.