Code Duplication    Length = 9-9 lines in 2 locations

src/Form.php 1 location

@@ 1101-1109 (lines=9) @@
1098
        $failedValidators = [];
1099
1100
        /** @var Field $field */
1101
        foreach ($this->builder->fields() as $field) {
1102
            if (!$validator = $field->getValidator($input)) {
1103
                continue;
1104
            }
1105
1106
            if (($validator instanceof Validator) && !$validator->passes()) {
1107
                $failedValidators[] = $validator;
1108
            }
1109
        }
1110
1111
        $message = $this->mergeValidationMessages($failedValidators);
1112

src/Widgets/Form.php 1 location

@@ 380-388 (lines=9) @@
377
        $failedValidators = [];
378
379
        /** @var Field $field */
380
        foreach ($this->fields() as $field) {
381
            if (!$validator = $field->getValidator($request->all())) {
382
                continue;
383
            }
384
385
            if (($validator instanceof Validator) && !$validator->passes()) {
386
                $failedValidators[] = $validator;
387
            }
388
        }
389
390
        $message = $this->mergeValidationMessages($failedValidators);
391