Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CountConstraint.php

function CountConstraint::__construct

Overrides Count::__construct

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php, line 24

Class

CountConstraint
Count constraint.

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

Code

public function __construct(...$args) {
    $this->minMessage = 'This collection should contain %limit element or more.|This collection should contain %limit elements or more.';
    $this->maxMessage = 'This collection should contain %limit element or less.|This collection should contain %limit elements or less.';
    $this->exactMessage = 'This collection should contain exactly %limit element.|This collection should contain exactly %limit elements.';
    parent::__construct(...$args);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal