Viewer doesn't set REQUIRED flag for required fields

PDF.js Express Version

Detailed description of issue
PDF.js express doesn’t recognize required fields.
When I create PDF document using Adobe Acrobat and add required fields - these fields do not have required flag: field.flags.get(Annotations.WidgetFlags.REQUIRED);.
Btw, read-only flag works fine.

Expected behaviour
Expect to see Required flag is set for required fields.

Link to document
PDFForm.pdf (56.8 KB)
file contains required field as an example.

Code snippet

      const fieldManager = annotManager.getFieldManager();
      fieldManager.forEachField(field => {
        const isRequired = field.flags.get(Annotations.WidgetFlags.REQUIRED);

Hey there!

Thanks for the bug report and the document. We can reproduce the issue and will have it fixed in a future release.

Edit: We have found and fixed the problem, so hang tight for the next release!