You are here

class CpfValueConstraint in CPF 8

Same name and namespace in other branches
  1. 8.2 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 15

Namespace

Drupal\cpf\Plugin\Validation\Constraint
View source
class CpfValueConstraint extends Constraint {
  public $message = 'The CPF number %value is not valid';

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

}

Members