Open mdewinne opened 6 days ago
The regex is used in the schematron files, where the character "&" must be escaped as "&". But it is indeed incorrect to have it escaped in fields.json.
We'll look into resolving this issue, so that the regex is fully correct in fields.json.
This will be corrected in SDK 1.13.0 (see linked commit above).
Please note that the pattern to validate URL is also affected: it contained &
, but also "
, which will be replaced by \"
(the correct escaping for JSON).
We noticed that the current regular expression for validating e-mail addresses (as used for example in fields.json) contains the html character code
&
in the character group right before the @.Is there a particular reason why the regex is formulated this way and not by using the character & as such?
We try to align our platform as much as possible with the eForms standard, but noticed that said regex would - in its unaltered form - allow incorrect e-mail addresses containing a semicolon, as can be observed here: https://regex101.com/r/5qh1ZO/1
But even within the SDK framework, we think that there might be an inconsistency between fields.json and schematron validation. Our front-end notice editor (which shows inline validation based on fields.json) accepts the addresses with a semicolon, only to see them refused afterwards by the schematron, when saving and validating the notice.