Closed helen-m-lin closed 6 months ago
We can try to pinpoint the underlying and timebox this to a few days at most
There were a few related issues causing validation errors:
discriminator
support enabled. Each individual field was being compared against all possible oneOf
options rather than only currently selected, causing multiple errors under each field.must NOT have additional properties
errors when the new option has a different schema and persisted incorrect values to the new schema.additionalProperties
to empty arrays. This caused additional must NOT have additional properties
errors.These issues are addressed in PR #151
Describe the bug When a user submits an incomplete form or a form with some errors, some schemas show errors on optional fields and other false positive errors.
Rig
schemas where an incompleteMouse Platform
section would highlight every field as incorrect regardless of if it has errors.*
), the validation errors for the entire section disappear.To Reproduce Steps to reproduce the behavior:
Rig
in the "Select schema" dropdown*
) in 1 sub-section only (e.g. enter Device name inMouse Platform
) while ignoring false positive errors on optional fields.Expected behavior There should not be false positive validation errors.
Screenshots
False positive errors on optional fields:![image](https://github.com/AllenNeuralDynamics/aind-metadata-entry-js/assets/46795546/68956e29-1147-4134-988e-3b4431fa9736)
After filling out required fields, false errors disappear:![image](https://github.com/AllenNeuralDynamics/aind-metadata-entry-js/assets/46795546/70136d26-9f44-442b-aea7-68f8bf749c90)
Desktop (please complete the following information):
Additional context We should check all schemas to see if the same issue is occurring. Rig seems to be experiencing the most issues.