Skip to content

Commit 691f18b

Browse files
authored
ENGCOM-5616: Do not validate length and input rule if attribute value is required but empty #22003
2 parents adee85d + 3cf1818 commit 691f18b

File tree

1 file changed

+2
-0
lines changed
  • app/code/Magento/Eav/Model/Attribute/Data

1 file changed

+2
-0
lines changed

app/code/Magento/Eav/Model/Attribute/Data/Text.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public function validateValue($value)
7575
if (empty($value) && $value !== '0' && $attribute->getDefaultValue() === null) {
7676
$label = __($attribute->getStoreLabel());
7777
$errors[] = __('"%1" is a required value.', $label);
78+
79+
return $errors;
7880
}
7981

8082
$validateLengthResult = $this->validateLength($attribute, $value);

0 commit comments

Comments
 (0)