class CpfUniqueConstraint in CPF 8
Same name and namespace in other branches
- 8.2 src/Plugin/Validation/Constraint/CpfUniqueConstraint.php \Drupal\cpf\Plugin\Validation\Constraint\CpfUniqueConstraint
Supports validating CPF numbers.
Plugin annotation
@Constraint(
id = "CpfUnique",
label = @Translation("CPF Value", context = "Validation")
)
Hierarchy
- class \Drupal\cpf\Plugin\Validation\Constraint\CpfUniqueConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of CpfUniqueConstraint
File
- src/
Plugin/ Validation/ Constraint/ CpfUniqueConstraint.php, line 15
Namespace
Drupal\cpf\Plugin\Validation\ConstraintView source
class CpfUniqueConstraint extends Constraint {
public $entity = NULL;
public $fieldDefinition = '';
public $ignoreBundle = 0;
public $message = 'The CPF number %value already exists. Enter a unique number.';
/**
* {@inheritdoc}
*/
public function validatedBy() {
return '\\Drupal\\cpf\\Plugin\\Validation\\Constraint\\CpfUniqueConstraintValidator';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CpfUniqueConstraint:: |
public | property | ||
CpfUniqueConstraint:: |
public | property | ||
CpfUniqueConstraint:: |
public | property | ||
CpfUniqueConstraint:: |
public | property | ||
CpfUniqueConstraint:: |
public | function |