PinEmbedCodeConstraint.php in Media entity Pinterest 8
Same filename and directory in other branches
File
src/Plugin/Validation/Constraint/PinEmbedCodeConstraint.phpView source
<?php
namespace Drupal\media_entity_pinterest\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
/**
* Checks if a value is a valid Pin embed code/URL.
*
* @Constraint(
* id = "PinEmbedCode",
* label = @Translation("Pin embed code", context = "Validation"),
* type = { "link", "string", "string_long" }
* )
*/
class PinEmbedCodeConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'Not valid Pin URL/embed code.';
}
Classes
Name | Description |
---|---|
PinEmbedCodeConstraint | Checks if a value is a valid Pin embed code/URL. |