class PinEmbedCodeConstraint in Media entity Pinterest 8
Same name and namespace in other branches
- 8.2 src/Plugin/Validation/Constraint/PinEmbedCodeConstraint.php \Drupal\media_entity_pinterest\Plugin\Validation\Constraint\PinEmbedCodeConstraint
Checks if a value is a valid Pin embed code/URL.
Plugin annotation
@Constraint(
id = "PinEmbedCode",
label = @Translation("Pin embed code", context = "Validation"),
type = { "link", "string", "string_long" }
)
Hierarchy
- class \Drupal\media_entity_pinterest\Plugin\Validation\Constraint\PinEmbedCodeConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of PinEmbedCodeConstraint
1 file declares its use of PinEmbedCodeConstraint
- ConstraintsTest.php in tests/
src/ Unit/ ConstraintsTest.php
File
- src/
Plugin/ Validation/ Constraint/ PinEmbedCodeConstraint.php, line 16
Namespace
Drupal\media_entity_pinterest\Plugin\Validation\ConstraintView source
class PinEmbedCodeConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'Not valid Pin URL/embed code.';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PinEmbedCodeConstraint:: |
public | property | The default violation message. |