mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
implements max holder and validation on UI
This commit is contained in:
@@ -12,4 +12,8 @@ class MaxHolder extends Constraint
|
||||
public $message = 'household.max_holder_overflowed';
|
||||
public $messageInfinity = 'household.max_holder_overflowed_infinity';
|
||||
|
||||
public function getTargets()
|
||||
{
|
||||
return self::CLASS_CONSTRAINT;
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ class MaxHolderValidator extends ConstraintValidator
|
||||
|
||||
if ($covers->hasIntersections()) {
|
||||
foreach ($covers->getIntersections() as list($start, $end, $ids)) {
|
||||
$msg = $end === null ? $constraint->messageEndInfinite :
|
||||
$msg = $end === null ? $constraint->messageInfinity :
|
||||
$constraint->message;
|
||||
|
||||
$this->context->buildViolation($msg)
|
||||
|
Reference in New Issue
Block a user