Skip to content

Commit

Permalink
Added invalid_message_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
boekkooi committed Dec 17, 2014
1 parent e48da2c commit e25317e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Form/Rule/Processor/ViewTransformerProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ protected function getFormRuleMessage(FormConfigInterface $config)
{
// Get correct error message if one is set.
if ($config->hasOption('invalid_message')) {
// TODO support invalid_message_parameters
return new RuleMessage($config->getOption('invalid_message'));
$params = $config->getOption('invalid_message_parameters');
return new RuleMessage(
$config->getOption('invalid_message'),
is_array($params) ? $params : array()
);
}

return null;
Expand Down

0 comments on commit e25317e

Please sign in to comment.