You are here

class MerciMaxLengthConstraint in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

Checks that the node is assigned only a "leaf" term in the forum taxonomy.

Plugin annotation


@Constraint(
  id = "MerciMaxLength",
  label = @Translation("MerciMaxLength", context = "Validation"),
)

Hierarchy

  • class \Drupal\merci\Plugin\Validation\Constraint\MerciMaxLengthConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of MerciMaxLengthConstraint

File

src/Plugin/Validation/Constraint/MerciMaxLengthConstraint.php, line 20
Contains \Drupal\merci\Plugin\Validation\Constraint\MerciMaxLengthConstraint.

Namespace

Drupal\merci\Plugin\Validation\Constraint
View source
class MerciMaxLengthConstraint extends Constraint {
  public $date_field;
  public $interval_field;
  public $grouping_field;
  public $message = 'Item cannot be reserved for longer than @interval @period.';

  /**
   ** {@inheritdoc}
   */
  public function getRequiredOptions() {
    return array(
      'date_field',
      'interval_field',
    );
  }

}

Members