Code Duplication    Length = 9-9 lines in 3 locations

src/Widgets/Form.php 1 location

@@ 405-413 (lines=9) @@
402
        $failedValidators = [];
403
404
        /** @var Field $field */
405
        foreach ($this->fields() as $field) {
406
            if (!$validator = $field->getValidator($request->all())) {
407
                continue;
408
            }
409
410
            if (($validator instanceof Validator) && !$validator->passes()) {
411
                $failedValidators[] = $validator;
412
            }
413
        }
414
415
        $message = $this->mergeValidationMessages($failedValidators);
416

src/Actions/Interactor/Form.php 1 location

@@ 340-348 (lines=9) @@
337
        $failedValidators = [];
338
339
        /** @var Field $field */
340
        foreach ($this->fields as $field) {
341
            if (!$validator = $field->getValidator($request->all())) {
342
                continue;
343
            }
344
345
            if (($validator instanceof Validator) && !$validator->passes()) {
346
                $failedValidators[] = $validator;
347
            }
348
        }
349
350
        $message = $this->mergeValidationMessages($failedValidators);
351

src/Form.php 1 location

@@ 1199-1207 (lines=9) @@
1196
        $failedValidators = [];
1197
1198
        /** @var Field $field */
1199
        foreach ($this->builder->fields() as $field) {
1200
            if (!$validator = $field->getValidator($input)) {
1201
                continue;
1202
            }
1203
1204
            if (($validator instanceof Validator) && !$validator->passes()) {
1205
                $failedValidators[] = $validator;
1206
            }
1207
        }
1208
1209
        $message = $this->mergeValidationMessages($failedValidators);
1210