Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* This file is part of the LuneticsLocaleBundle package. | ||
* | ||
* <https://github.com/lunetics/LocaleBundle/> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that is distributed with this source code. | ||
*/ | ||
|
||
namespace Lunetics\LocaleBundle\Validator; | ||
|
||
use Symfony\Component\Validator\Constraint; | ||
|
||
/** | ||
* LocaleAllowed Constraint | ||
* | ||
* @Annotation | ||
*/ | ||
class LocaleAllowed extends Constraint | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $message = 'The locale "%string%" is not allowed by application configuration.'; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function validatedBy() | ||
{ | ||
return 'lunetics_locale.validator.locale_allowed'; | ||
} | ||
} |