You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, for our desired use case, this causes eido validation to fail:
_validate_sample_object(
File "/home/drc/GITHUB/looper/master/looper/venv/lib/python3.10/site-packages/eido/validation.py", line 100, in _validate_sample_object
_validate_object(sample.to_dict(), sample_schema_dict)
File "/home/drc/GITHUB/looper/master/looper/venv/lib/python3.10/site-packages/eido/validation.py", line 47, in _validate_object
instance_name = error.instance[sample_name_colname]
IndexError: string index out of range
This is because error.instance is empty and sample_name_colname=False
However, if you do have some value in the field such as 'h' but the minLength: 2, we see a better message:
Error: EidoValidationError (Validation failed): {"'h' is not valid under any of the given schemas": [{'type': "'h' is not valid under any of the given schemas", 'message': "'h' is not valid under any of the given schemas on instance h", 'sample_name': 'h'}]}
["'h' is not valid under any of the given schemas"]
We should also probably have this functionality just work as intended where it expects a minLength if something is supplied in the required field. Right now, the user has to add the field under required AND add minLength to have this work as expected.
This is because
error.instance
is empty andsample_name_colname=False
However, if you do have some value in the field such as 'h' but the minLength: 2, we see a better message:
Originally posted by @donaldcampbelljr in pepkit/looper#523 (comment)
The text was updated successfully, but these errors were encountered: