InseeFr / Pogues

Questionnaire designer
MIT License
20 stars 17 forks source link

Recurrent complex text formats #746

Open BulotF opened 6 months ago

BulotF commented 6 months ago

In some cases, text formats are current and really complex: mainly SIREN and SIRET, but email or telephone, too.

Moreover, for Siren and Siret, regex is not enough. 3 checks are made for which Pogues's users fluently want to personalize the label.

UX Proposal: Replace the "Motif" text by something much richer: A drop-down list of standard complex formats including : Siren, Siret, email, ... and Other Choosing one would make appear a list of one or several:

For Siret for example, 1 pattern and 2 VTL formulas would appear.

User may change label, pattern or formula ; remove or add one

Pogues-back-office would provide a list of:

Pogues-model: In TextDatatypeType, Pattern, which is not used would be replaced by a element FormatCheck of type FormatCheckType, minOccurs="0" ; maxOccurs="unbounded" FormatCheckType would be a sequence of:

DDI: Pattern would be saved in the TextDaomin / @RegExp Formula would be saved in a ComputationItem with TypeOfComputationItem = formatExtendedCheck