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
I am trying to validate two keys that cannot appear together. Both keys are optional, and are set to be empty when they are empty strings. I am currently using .without() to forbid one key when the other is present, but when the reference key is an empty string, the validation fails with the following error:
" "person" conflict with forbidden peer "group" "
It seems as if the .without() check is happening before the .empty(''), and is registering the reference key as an empty string instead of undefined.
Is there a better way to handle this, or do you have any suggestions?
I am trying to validate two keys that cannot appear together. Both keys are optional, and are set to be empty when they are empty strings. I am currently using .without() to forbid one key when the other is present, but when the reference key is an empty string, the validation fails with the following error:
" "person" conflict with forbidden peer "group" "
It seems as if the .without() check is happening before the .empty(''), and is registering the reference key as an empty string instead of undefined.
Is there a better way to handle this, or do you have any suggestions?
The text was updated successfully, but these errors were encountered: