AllenNeuralDynamics / aind-metadata-entry-js

Metadata entry using javascript
https://metadata-entry.allenneuraldynamics.org
MIT License
1 stars 1 forks source link

Data description schema not rendering #120

Closed mekhlakapoor closed 3 months ago

mekhlakapoor commented 9 months ago

Describe the bug When the data description schema is selected, the app renders error message Invalid regular expression: /^[^<>:;"/|? \_]+$/u: Invalid escape

UPDATE: the form renders, but fails validation during submission with the same error.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

helen-m-lin commented 4 months ago

Note: This is affecting all data_description schemas >= 0.12.0 (currently 0.13.6). Also observed on RJSF playground.

The error is due to the project_name field, which uses the pattern NO_SPECIAL_CHARS_EXCEPT_SPACE = '^[^<>:;"/|?\\_]+$' from aind-data-schema-models. Escaping the / char should fix the bug.

helen-m-lin commented 4 months ago

PR in https://github.com/AllenNeuralDynamics/aind-data-schema-models/pull/10 should fix the issue. I tested the new json schema in the rjsf playground and the metadata entry app. @jtyoung84

helen-m-lin commented 3 months ago

This is now resolved as of data_description version 0.13.7