You are here

class UniqueBirthLogConstraint in farmOS 2.x

Checks that only one birth log references an asset.

Plugin annotation


@Constraint(
  id = "UniqueBirthLog",
  label = @Translation("Unique birth log", context = "Validation"),
)

Hierarchy

  • class \Drupal\farm_birth\Plugin\Validation\Constraint\UniqueBirthLogConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of UniqueBirthLogConstraint

File

modules/log/birth/src/Plugin/Validation/Constraint/UniqueBirthLogConstraint.php, line 15

Namespace

Drupal\farm_birth\Plugin\Validation\Constraint
View source
class UniqueBirthLogConstraint extends Constraint {

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = '%child already has a birth log. More than one birth log cannot reference the same child.';

}

Members

Namesort descending Modifiers Type Description Overrides
UniqueBirthLogConstraint::$message public property The default violation message.