Skip to content

Commit

Permalink
Id Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Pollastri committed Jan 26, 2024
1 parent 06a4911 commit 5b71356
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/Id.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class Id extends Model

public function __construct(...$args)
{
$this->IdCodice = Settings::CodiceDestinatarioDefault();

if (isset($args[0]) && $args[0]) {
$this->IdCodice = $args[0];
}
Expand All @@ -23,7 +25,7 @@ public function __construct(...$args)

public static function loadValidatorMetadata(ClassMetadata $metadata): void
{
$metadata->addPropertyConstraint('IdCodice', new Length(null, 9, 11));
$metadata->addPropertyConstraint('IdCodice', new Length(null, 7, 13));
$metadata->addPropertyConstraint('IdPaese', new Length(2));
}
}

0 comments on commit 5b71356

Please sign in to comment.