You are here

class CpfValueConstraint in CPF 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Validation/Constraint/CpfValueConstraint.php \Drupal\cpf\Plugin\Validation\Constraint\CpfValueConstraint

Supports validating CPF numbers.

Plugin annotation


@Constraint(
  id = "CpfValue",
  label = @Translation("CPF Value", context = "Validation")
)

Hierarchy

  • class \Drupal\cpf\Plugin\Validation\Constraint\CpfValueConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of CpfValueConstraint

File

src/Plugin/Validation/Constraint/CpfValueConstraint.php, line 20
Contains \Drupal\cpf\Plugin\Validation\Constraint\CpfValueConstraint.

Namespace

Drupal\cpf\Plugin\Validation\Constraint
View source
class CpfValueConstraint extends Constraint {

  /**
   *
   *
   * @var string
   */
  public $message = 'The CPF number %value is not valid';

  /**
   * {@inheritdoc}
   */
  public function validatedBy() {
    return '\\Drupal\\cpf\\Plugin\\Validation\\Constraint\\CpfValueConstraintValidator';
  }

}

Members