feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility
This commit is contained in:
+2
-1
@@ -144,11 +144,12 @@ export function validateXml(
|
||||
const validator = ValidatorFactory.createValidator(xml);
|
||||
return validator.validate(level);
|
||||
} catch (error) {
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
return {
|
||||
valid: false,
|
||||
errors: [{
|
||||
code: 'VAL-ERROR',
|
||||
message: `Validation error: ${error.message}`
|
||||
message: `Validation error: ${errorMessage}`
|
||||
}],
|
||||
level
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user