File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -312,11 +312,12 @@ component accessors="true" serialize="false" singleton {
312312 * It handles nested constraints (via "constraints" or "nestedConstraints" keys) and array item constraints (via "items" or "arrayItem" keys)
313313 * by recursively filtering nested objects and arrays as needed.
314314 *
315+ * with nested structures and arrays filtered recursively as specified by the constraints.
316+ *
315317 * @target The target structure or object to filter. Can be a struct or an object containing fields to validate.
316318 * @constraints The structure of constraints to use for filtering the target. Keys correspond to fields in the target.
317319 *
318320 * @return struct: A new structure containing only the fields from the target that match the provided constraints,
319- * with nested structures and arrays filtered recursively as specified by the constraints.
320321 */
321322 private any function filterTargetForConstraints ( required any target , required struct constraints ){
322323 var filteredTarget = {};
@@ -347,9 +348,7 @@ component accessors="true" serialize="false" singleton {
347348 filteredArray = arguments .target [ key ];
348349 }
349350 filteredTarget [ key ] = filteredArray ;
350- } else if (
351- constraint .keyExists ( " constraints" ) || constraint .keyExists ( " nestedConstraints" )
352- ) {
351+ } else if ( constraint .keyExists ( " constraints" ) || constraint .keyExists ( " nestedConstraints" ) ) {
353352 filteredTarget [ key ] = filterTargetForConstraints (
354353 target = arguments .target [ key ],
355354 constraints = (
You can’t perform that action at this time.
0 commit comments