diff --git a/ui/src/views/device-profiles/DeviceProfileForm.tsx b/ui/src/views/device-profiles/DeviceProfileForm.tsx index a8394b00..657def2e 100644 --- a/ui/src/views/device-profiles/DeviceProfileForm.tsx +++ b/ui/src/views/device-profiles/DeviceProfileForm.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; -import { Form, Input, Select, InputNumber, Switch, Row, Col, Button, Tabs, Modal, Spin, Cascader, Card } from "antd"; +import { Form, Input, Select, InputNumber, Switch, Row, Col, Button, Tabs, Modal, Spin, Cascader, Card, notification } from "antd"; import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; import { @@ -305,6 +305,14 @@ function DeviceProfileForm(props: IProps) { props.onFinish(dp); }; + const onFinishFailed = () => { + notification.error({ + message: "Validation errors", + description: "Please inspect input fields for errors", + duration: 30, + }); + }; + const onSupportsOtaaChange = (checked: boolean) => { setSupportsOtaa(checked); }; @@ -401,7 +409,7 @@ function DeviceProfileForm(props: IProps) { ); return ( -