merged branch widop/patch-1 (PR #4447)

Commits
-------

395004c [Bridge][Doctrine] Fix missing dot in unique entity error message

Discussion
----------

[Bridge][Doctrine] Fix missing dot in unique entity error message

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: none
Todo: none
License of the code: MIT
Documentation PR: none

The translation message defined in the FrameworkExtraBundle defines the unique entity error message like that: ``This value is already used.`` but is defined without the dot in the Doctrine UniqueEntity validator. This PR fixes this issue.

---------------------------------------------------------------------------

by travisbot at 2012-05-29T12:31:59Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1464732) (merged 675c744c into adf07f1e).

---------------------------------------------------------------------------

by travisbot at 2012-05-29T14:24:48Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1465598) (merged 395004c0 into adf07f1e).
This commit is contained in:
Fabien Potencier 2012-05-30 07:10:15 +02:00
commit f15c9cd19d
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ class UniqueValidatorTest extends DoctrineOrmTestCase
$this->assertEquals(1, $violationsList->count(), "No violations found on entity after it was saved to the database.");
$violation = $violationsList[0];
$this->assertEquals('This value is already used', $violation->getMessage());
$this->assertEquals('This value is already used.', $violation->getMessage());
$this->assertEquals('name', $violation->getPropertyPath());
$this->assertEquals('Foo', $violation->getInvalidValue());
}

View File

@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint;
*/
class UniqueEntity extends Constraint
{
public $message = 'This value is already used';
public $message = 'This value is already used.';
public $service = 'doctrine.orm.validator.unique';
public $em = null;
public $fields = array();