Implement SWHID validation in frontend
Sending malformed SWHID to the resolver implemented in the webapp will end up with parsing errors.
We should validate SWHID format in any form of the webapp taking such input (currently search forms) and report errors in the Web UI if format errors get detected.
To do so, we must implement SWHID validation in Javascript in a similar manner as in the Python code
available in the identifiers module from swh-model
.
This code could later be packaged in a small npm module to offer its use in external projects.
Migrated from T3247 (view on Phabricator)