mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix validation short circuit on _or (#5806)
* Fix _or validation step when in nested context Fixes #5405 * Add changeset
This commit is contained in:
@@ -274,7 +274,8 @@ export class AuthorizationService {
|
||||
const nestedErrors = flatten<FailedValidationException>(
|
||||
subValidation.map((subObj: Record<string, any>) => this.validateJoi(subObj, payload))
|
||||
);
|
||||
const allErrored = nestedErrors.every((err?: FailedValidationException) => err);
|
||||
|
||||
const allErrored = subValidation.length === nestedErrors.length;
|
||||
|
||||
if (allErrored) {
|
||||
errors.push(...nestedErrors);
|
||||
|
||||
Reference in New Issue
Block a user