FeedUrlConstraint.php

Same filename in other branches
  1. 8.9.x core/modules/aggregator/src/Plugin/Validation/Constraint/FeedUrlConstraint.php

Namespace

Drupal\aggregator\Plugin\Validation\Constraint

File

core/modules/aggregator/src/Plugin/Validation/Constraint/FeedUrlConstraint.php

View source
<?php

namespace Drupal\aggregator\Plugin\Validation\Constraint;

use Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint;

/**
 * Supports validating feed URLs.
 *
 * @Constraint(
 *   id = "FeedUrl",
 *   label = @Translation("Feed URL", context = "Validation")
 * )
 */
class FeedUrlConstraint extends UniqueFieldConstraint {
    public $message = 'A feed with this URL %value already exists. Enter a unique URL.';

}

Classes

Title Deprecated Summary
FeedUrlConstraint Supports validating feed URLs.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.