Skip to content

Commit 92ca347

Browse files
committed
AC-13535: Minimum and maximum value validation does not work for DOB attribute on Storefront
1 parent 3583d32 commit 92ca347

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class ValidateDobOnSave
2626
*/
2727
private $json;
2828

29+
/**
30+
* @param EavConfig $eavConfig
31+
* @param JsonSerializer $json
32+
*/
2933
public function __construct(
3034
EavConfig $eavConfig,
3135
JsonSerializer $json
@@ -34,6 +38,16 @@ public function __construct(
3438
$this->json = $json;
3539
}
3640

41+
/**
42+
* @param CustomerRepositoryInterface $subject
43+
* @param callable $proceed
44+
* @param CustomerInterface $customer
45+
* @param $passwordHash
46+
* @return mixed
47+
* @throws InputException
48+
* @throws \Magento\Framework\Exception\LocalizedException
49+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
50+
*/
3751
public function aroundSave(
3852
CustomerRepositoryInterface $subject,
3953
callable $proceed,
@@ -82,7 +96,9 @@ public function aroundSave(
8296
}
8397

8498
/**
85-
* @param $value
99+
* Parse a date value into DateTimeImmutable.
100+
*
101+
* @param mixed $value
86102
* @return \DateTimeImmutable|null
87103
* @throws \Exception
88104
*/

app/code/Magento/Customer/etc/frontend/di.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2011 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

0 commit comments

Comments
 (0)