-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-28902: Creating a user with existing username results in Internal…
… Server Error. (#224)
- Loading branch information
1 parent
740baf8
commit ae9c470
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace EzSystems\RepositoryForms\Validator\Constraints; | ||
|
||
use JMS\TranslationBundle\Translation\TranslationContainerInterface; | ||
use JMS\TranslationBundle\Model\Message; | ||
|
||
/** | ||
* This class holds translation messages which comes from kernel as ValidationError messages. | ||
* It allows JMSTranslationBundle to extracting those messages. | ||
*/ | ||
class FieldValueValidatorMessages implements TranslationContainerInterface | ||
{ | ||
/** | ||
* Returns an array of messages. | ||
* | ||
* @return Message[] | ||
*/ | ||
public static function getTranslationMessages(): array | ||
{ | ||
return [ | ||
new Message("The user login '%login%' is used by another user. You must enter a unique login.", 'validators'), | ||
]; | ||
} | ||
} |