Skip to content

Commit

Permalink
Comment the validateAnswer method and run the value through the strin…
Browse files Browse the repository at this point in the history
…gParser lib with the questionAnswers - #7
  • Loading branch information
andrewhathaway committed Sep 14, 2015
1 parent 56cb9a0 commit 3810c21
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ var validateAnswer = (value, validationItem, questionAnswers) => {
+ validationItem.type + '"');
}

/*
* Run the value string through the stringParser with the
* questionAnswers so that it sets the questionAnswer
* as the value.
*/
value = StringParser(value, questionAnswers);

/*
* Clone the validation parameters so it doesn't effect the
* parameters by reference. Then push the value to the first
* parameter.
*/
var validationParameters = (validationItem.params || []).slice(0);
validationParameters.unshift(value);

Expand Down

0 comments on commit 3810c21

Please sign in to comment.