// At least one of the alternatives *did* match, but it failed somewhere further down the tree. Chances are that the user intended to match that branch, so we pretend that the other alternatives don't exist, and pass through the original error(s).
returnvalidationResult({errors:nestedErrors});
}else{
letalternativesList=sameLevelErrors
.map((error)=>`"${error.message}"`)
.join(", ");
.join(", ");
thrownewValidationError(`Must satisfy at least one of: ${errorList}`,{errors:allErrors});
thrownewValidationError(`Must satisfy at least one of: ${alternativesList}`,{errors:sameLevelErrors});