Skip to content

Improve validation result clarity for PDF/A-3 warnings (BR-FX-DE-03)#16

Open
zsrdjan wants to merge 3 commits intomainfrom
feature/15-pdf-sub-validation-ux
Open

Improve validation result clarity for PDF/A-3 warnings (BR-FX-DE-03)#16
zsrdjan wants to merge 3 commits intomainfrom
feature/15-pdf-sub-validation-ux

Conversation

@zsrdjan
Copy link
Copy Markdown
Contributor

@zsrdjan zsrdjan commented Mar 26, 2026

Closes #15

Summary

  • Add isPdfValid and isXmlValid fields to PdfFileValidationResponse so API consumers can distinguish PDF/A warnings from XML errors without parsing the raw validation report XML
  • WebUI result card now shows a per-section breakdown (XML invoice, PDF/A-3, Signature) with appropriate icons - amber warning for PDF/A issues with an explanatory note when the overall invoice is still valid under BR-FX-DE-03
  • Toast notifications now use red for invalid invoices, amber for valid invoices with PDF/A-3 warnings, and green for fully valid invoices
  • Use MinusCircle icon for absent signatures instead of the misleading warning icon
  • Bump version to 2026.3.0

Test plan

  • Upload a ZuGFeRD PDF where both buyer and seller are in Germany and PDF/A-3 is non-conformant - expect overall isValid: true, isPdfValid: false, isXmlValid: true, amber toast with BR-FX-DE-03 note, amber warning icon next to PDF/A-3 in the result card
  • Upload a fully valid ZuGFeRD PDF - expect all three sub-validation indicators green, green toast
  • Upload an invalid invoice (bad XML) - expect red toast, red X next to XML invoice
  • Upload a PDF without a digital signature - expect MinusCircle (-) next to Signature, not a warning icon

@zsrdjan zsrdjan requested a review from novakklemen March 26, 2026 16:31
zsrdjan added 3 commits March 26, 2026 17:32
Add isPdfValid and isXmlValid fields to PdfFileValidationResponse so
callers can distinguish PDF/A warnings from XML errors without parsing
the raw validation report XML.

Under ZuGFeRD rule BR-FX-DE-03, PDF/A compliance failures are non-fatal
warnings for German invoices, so isValid may be true while isPdfValid is
false. The new fields make this transparent.

The WebUI result card now shows a per-section breakdown (XML invoice,
PDF/A-3, Signature) with appropriate icons — amber warning for PDF/A
issues with an explanatory note when the overall invoice is still valid.
Invalid invoices now show a red (destructive) toast, valid invoices with
PDF/A-3 warnings show amber with a BR-FX-DE-03 note, and fully valid
invoices stay green. Also use MinusCircle for absent signatures instead
of the misleading warning icon.
@zsrdjan zsrdjan force-pushed the feature/15-pdf-sub-validation-ux branch from d6c6def to 65eae80 Compare March 26, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve validation result clarity for PDF/A-3 warnings (BR-FX-DE-03)

1 participant