public Election::addConstraint
Description
public Election->addConstraint ( string $constraintClass ): true
Add a constraint rules as a valid class path.
constraintClass: string
A valid class path. Class must extend VoteConstraint class.
Return value:
(true
) True on success.
Throws:
CondorcetPHP\Condorcet\Throwable\VoteConstraintException
Related method(s)
- Election::getConstraints
- Election::clearConstraints
- Election::testIfVoteIsValidUnderElectionConstraints