Skip to content

Commit 969455d

Browse files
committed
refactor(FieldValidator): remove redundant PipelineType check from null-skip logic
All pipeline steps already declare skipNull explicitly, making the PipelineType::VALIDATION type check redundant. Null-skipping is now driven solely by the skipNull flag.
1 parent 6b89d06 commit 969455d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Lemmon/Validator/FieldValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public function tryValidate(mixed $value, string $key = '', mixed $input = null)
388388

389389
// Execute pipeline
390390
foreach ($this->pipeline as $step) {
391-
if (is_null($processedValue) && ($step['type'] === PipelineType::VALIDATION || $step['skipNull'])) {
391+
if (is_null($processedValue) && $step['skipNull']) {
392392
continue;
393393
}
394394
$processedValue = $step['operation']($processedValue, $key, $input);

0 commit comments

Comments
 (0)