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

Breadcrumb

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

function CardScheme::__construct

Parameters

non-empty-string|non-empty-string[]|array<string,mixed>|null $schemes Name(s) of the number scheme(s) used to validate the credit card number:

string[]|null $groups:

array<string,mixed> $options:

Overrides Constraint::__construct

File

vendor/symfony/validator/Constraints/CardScheme.php, line 54

Class

CardScheme
Validates a credit card number for a given credit card company.

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(array|string|null $schemes, ?string $message = null, ?array $groups = null, mixed $payload = null, array $options = []) {
    if (\is_array($schemes) && \is_string(key($schemes))) {
        $options = array_merge($schemes, $options);
    }
    else {
        $options['value'] = $schemes;
    }
    parent::__construct($options, $groups, $payload);
    $this->message = $message ?? $this->message;
}
RSS feed
Powered by Drupal