WeatherDisplayConstraint.php in Weather 2.0.x
Same filename and directory in other branches
File
src/Plugin/Validation/Constraint/WeatherDisplayConstraint.phpView source
<?php
namespace Drupal\weather\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
/**
* Checks that created Weather Display is valid.
*
* @Constraint(
* id = "WeatherDisplay",
* label = @Translation("Weather display unique", context = "Validation"),
* type = "string"
* )
*/
class WeatherDisplayConstraint extends Constraint {
/**
* Error message, the default display exists.
*
* @var string
*/
public $notUniqueDefaultDisplay = '%value default display already exists.';
/**
* Error message, the user display exists.
*
* @var string
*/
public $notUniqueUserDisplay = '%value display for this user already exists.';
}
Classes
Name | Description |
---|---|
WeatherDisplayConstraint | Checks that created Weather Display is valid. |