Skip to content

Commit cd4561b

Browse files
committed
AC-13535: Minimum and maximum value validation does not work for DOB attribute on Storefront
1 parent ba9509b commit cd4561b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Customer/Plugin/ValidateDobOnSave.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ public function __construct(
3939
}
4040

4141
/**
42+
* Enforce DOB min/max from attribute validate_rules on every save.
43+
*
4244
* @param CustomerRepositoryInterface $subject
4345
* @param callable $proceed
4446
* @param CustomerInterface $customer
45-
* @param $passwordHash
47+
* @param string|null $passwordHash
4648
* @return mixed
4749
* @throws InputException
4850
* @throws \Magento\Framework\Exception\LocalizedException
4951
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
52+
* @SuppressWarnings(PHPMD.NPathComplexity)
5053
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5154
*/
5255
public function aroundSave(
@@ -102,6 +105,7 @@ public function aroundSave(
102105
* @param mixed $value
103106
* @return \DateTimeImmutable|null
104107
* @throws \Exception
108+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
105109
*/
106110
private function parseDate($value): ?\DateTimeImmutable
107111
{

0 commit comments

Comments
 (0)