Skip to content

Commit

Permalink
unifying the message text for IsUnique error used by MemberConfigForm…
Browse files Browse the repository at this point in the history
… and MemberProfileForm (fixes #4045, BP from #3999)

(cherry picked from commit ceb4060)
  • Loading branch information
upsilon authored and Kimura Youichi committed Feb 15, 2017
1 parent 6f0fa19 commit c298665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions i18n/messages.ja.xml
Expand Up @@ -82,10 +82,6 @@
<source>Please input the below keyword.</source>
<target>上に表示されているキーワードを入力してください。</target>
</trans-unit>
<trans-unit id="">
<source>Invalid %name%.</source>
<target>不正な %name% です。</target>
</trans-unit>
<trans-unit id="">
<source>Mon</source>
<target>月</target>
Expand Down
4 changes: 2 additions & 2 deletions lib/form/doctrine/MemberConfigForm.class.php
Expand Up @@ -125,7 +125,7 @@ public function setMemberConfigWidget($name)
'empty_value' => $this->validatorSchema[$name]->getOption('empty_value'),
));

$uniqueValidator->addMessage('duplicate', 'Invalid %name%.');
$uniqueValidator->addMessage('duplicate', 'The inputted value is already exist.');

$this->validatorSchema[$name] = new sfValidatorAnd(array(
$this->validatorSchema[$name],
Expand Down Expand Up @@ -231,7 +231,7 @@ public function isUnique($validator, $value, $arguments = array())
return $value;
}

throw new sfValidatorError($validator, 'duplicate', array('name' => $name));
throw new sfValidatorError($validator, 'duplicate');
}

public function isValid()
Expand Down

0 comments on commit c298665

Please sign in to comment.