Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions i18n/messages.ja.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@
<source>Please input the below keyword.</source>
<target>上に表示されているキーワードを入力してください。</target>
</trans-unit>
<trans-unit id="">
<source>Invalid mobile_address.</source>
<target>メールアドレスが無効です。</target>
</trans-unit>
<trans-unit id="">
<source>Mon</source>
<target>月</target>
Expand Down
4 changes: 3 additions & 1 deletion lib/form/doctrine/MemberConfigForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public function setMemberConfigWidget($name)
'empty_value' => $this->validatorSchema[$name]->getOption('empty_value'),
));

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

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

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

public function isValid()
Expand Down