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
It seems a little awkward for .validate to return a single boolean True when the configspec is validated, but a dict when there is an error (especially since the non-empty dict is evaluated as True which can be misleading). Almost feels like there should be a .validate that is always boolean, False if any one of the validations failed, and then a validate.detail or something that always has a dict with {field: validation result}, even if the validation is all True.
Also is it possible to replace values where validate failed with a default as specified in the configspec? I'm currently doing this manually by iterating over the .validate if validate is not True (which is what prompted the above).
If any of this is user error, my apologies; I am new to the library (but finding it very helpful so far!)
Thanks a lot,
Rob
The text was updated successfully, but these errors were encountered:
Hello,
It seems a little awkward for .validate to return a single boolean True when the configspec is validated, but a dict when there is an error (especially since the non-empty dict is evaluated as True which can be misleading). Almost feels like there should be a .validate that is always boolean, False if any one of the validations failed, and then a validate.detail or something that always has a dict with {field: validation result}, even if the validation is all True.
Also is it possible to replace values where validate failed with a default as specified in the configspec? I'm currently doing this manually by iterating over the .validate if validate is not True (which is what prompted the above).
If any of this is user error, my apologies; I am new to the library (but finding it very helpful so far!)
Thanks a lot,
Rob
The text was updated successfully, but these errors were encountered: