IGNF / validator

Validateur de données initialement développé pour le géoportail de l'urbanisme
https://ignf.github.io/validator/
Other
12 stars 3 forks source link

Apply pattern control on String, Filename, Path types #214

Open mborne opened 3 years ago

mborne commented 3 years ago

Currently, "pattern" control is applied only on String. It should be applied at least to String, Filename and Path types.

Meanwhile, the validator will have to deal with values containing fragments such as "a-file.pdf#page=12" and pattern corresponding to "a-file.pdf".

=> 4.1 as it may lead to unexpected behavior

pedrogeo commented 3 years ago

Hi,

Since the last version on production of the validator (4.2.15), the rules to verify the paths in the URLREG or URLFIC attributes seems to have changed. Previously, it was possible to write relative paths like ..\Pieces_ecrites\3_Reglement\99999_reglement_20210810.pdf but it's no more possible now. An error with "INVALID_ATTRIBUTE_FORMAT" is detected.

Could you confirme to me if this is a rule change (only absolute paths are valid like https://serveur/99999_reglement_20210810.pdf or if this is a bug ?

Pierre

mborne commented 3 years ago

Hello,

URLREG and URLFIC have been typed as "Url" as it is specified as "Hyperlien" in CNIG standard ( http://cnig.gouv.fr/wp-content/uploads/2019/11/191115_Standard_CNIG_PLU.pdf#page=21&zoom=auto,-260,594 )

A complete URL is expected for URLREG and URLFIC and ..\Pieces_ecrites\3_Reglement\99999_reglement_20210810.pdf should not have been accepted by the past.

As I understand the CNIG standard, NOMFIC and NOMREG allows to specify the name of the file when a complete URL is not available. So, supporting a kind of relative path for URLREG and URLFIC would be useless. Please, use contact form on GpU ( https://www.geoportail-urbanisme.gouv.fr/contact/ ) if you think that it is an error.

Mickaël

PS : This issue is relative to the ability to apply regexp/pattern controls on URL (GpU not concerned)

pedrogeo commented 3 years ago

Hi,

Thanks for your feedback.

Pierre