You are here

class MerciAllowOvernightConstraint 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 = "MerciAllowOvernight",
  label = @Translation("MerciAllowOvernight", context = "Validation"),
)

Hierarchy

Expanded class hierarchy of MerciAllowOvernightConstraint

File

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

Namespace

Drupal\merci\Plugin\Validation\Constraint
View source
class MerciAllowOvernightConstraint extends Constraint {
  public $date_field;
  public $overnight_field;
  public $grouping_field;
  public $message = 'Reservation can not go overnight.';

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

}

Members