Skip to content

Commit

Permalink
Merge pull request #7 from axiostudio/develop
Browse files Browse the repository at this point in the history
Id Fix
  • Loading branch information
AP - Axio Studio authored Jan 26, 2024
2 parents a0f4743 + 5b71356 commit 407c922
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 407c922

Please sign in to comment.