diff --git a/src/Util/XML.php b/src/Util/XML.php index 1af9903b3..7fff7ed24 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -42,6 +42,8 @@ class XML /** * Removes the PKCS#7 header and the signature info footer from a digitally-signed .xml.p7m file using CAdES format. * + * TODO: controllare il funzionamento con gli allegati. + * * @param string $string File content * @return string An arguably-valid XML string with the .p7m header and footer stripped away. * diff --git a/src/Validate.php b/src/Validate.php index 33f4ad5e8..6a4e80155 100644 --- a/src/Validate.php +++ b/src/Validate.php @@ -11,7 +11,7 @@ use Respect\Validation\Validator as v; */ class Validate { - public static function VatCheck($partita_iva) + public static function vatCheck($partita_iva) { if ($partita_iva === '') { return true; @@ -54,6 +54,11 @@ class Validate return true; } + // Controllo sulla sintassi + if (!static::vatCheck($vat_number)) { + return false; + } + // Controllo con API europea ufficiale if (extension_loaded('soap')) { try {