Mercurial > hg > cmmr2012-drupal-site
diff vendor/chi-teck/drupal-code-generator/src/Helper/InputHandler.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/vendor/chi-teck/drupal-code-generator/src/Helper/InputHandler.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/chi-teck/drupal-code-generator/src/Helper/InputHandler.php Thu Feb 28 13:11:55 2019 +0000 @@ -93,6 +93,10 @@ if ($answers) { if (array_key_exists($name, $answers)) { $answer = $answers[$name]; + // Validate provided answer. + if ($validator = $question->getValidator()) { + $validator($answer); + } // Turn 'yes/no' string into boolean. if ($question instanceof ConfirmationQuestion && !is_bool($answer)) { $answer = strcasecmp($answer, 'yes') == 0;