gbif / edna-tool-ui

Frontend for the eDNA tool
2 stars 1 forks source link

Validate general format/type of data for some elements #46

Open EstebanMH-SiB opened 8 months ago

EstebanMH-SiB commented 8 months ago

Perhaps this tool could have some general validations of format like the IPT, for example decimalLatitude and decimalLongitude should be numbers, elements with DNA format (pcr_primer_forward, DNA_sequence, etc) should only accept uppercase letters.

It could be mandatory for required fields or maybe just show a warning that some fields have invalid data.

tobiasgf commented 3 months ago

We should/could maybe automatically uppercase DNA_sequence on ingestion in GBIF.org. In this tool we should implement it. We should maybe also validate that the field does not contain non-DNA compliant characters: DNA: ^[ACGTRKSYMWBHDVN]+$ And maybe specifically check or remove automatically: space, hyphen, and punctuations.