Pull request: 3824 fix DHCP empty form validation
Closes #3824 Squashed commit of the following: commit 24d5770e2f276f710c011bf94e36702881ccbf1a Merge: 8f53990032294407Author: Ildar Kamalov <ik@adguard.com> Date: Wed Nov 24 12:21:23 2021 +0300 Merge branch 'master' into 3824-empty-values commit 8f539900489c940c6d7068d672420a553a1da299 Merge: 4be7726851f11d2fAuthor: Ildar Kamalov <ik@adguard.com> Date: Tue Nov 23 19:06:44 2021 +0300 Merge branch 'master' into 3824-empty-values commit 4be77268ab1b3dc99b754b8002320a615db2d99e Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Nov 23 19:04:06 2021 +0300 all: use new consts commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b Author: Ildar Kamalov <ik@adguard.com> Date: Tue Nov 23 18:58:03 2021 +0300 client: get status on reset commit a20734cbf26a57ec96fdb6e0f868a8656751e80a Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Nov 23 18:31:59 2021 +0300 dhcpd: fix reset defaults commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5 Author: Ildar Kamalov <ik@adguard.com> Date: Tue Nov 23 17:33:22 2021 +0300 client: fix DHCP empty form validation
This commit is contained in:
@@ -102,6 +102,7 @@ const Dhcp = () => {
|
||||
Object.values(DHCP_FORM_NAMES)
|
||||
.forEach((formName) => dispatch(destroy(formName)));
|
||||
dispatch(resetDhcp());
|
||||
dispatch(getDhcpStatus());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -68,6 +68,10 @@ export const validateIpv4 = (value) => {
|
||||
* @param allValues
|
||||
*/
|
||||
export const validateNotInRange = (value, allValues) => {
|
||||
if (!allValues.v4) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const { range_start, range_end } = allValues.v4;
|
||||
|
||||
if (range_start && validateIpv4(range_start)) {
|
||||
|
||||
Reference in New Issue
Block a user