Wizard: Add validation to ChippingInput
This adds step validation to ChippingInput, allowing to validate imported values.
This commit is contained in:
parent
6ec433f9d3
commit
f11ab64262
8 changed files with 160 additions and 10 deletions
|
|
@ -9,11 +9,14 @@ import {
|
|||
selectNtpServers,
|
||||
} from '../../../../../store/wizardSlice';
|
||||
import ChippingInput from '../../../ChippingInput';
|
||||
import { useTimezoneValidation } from '../../../utilities/useValidation';
|
||||
import { isNtpServerValid } from '../../../validators';
|
||||
|
||||
const NtpServersInput = () => {
|
||||
const ntpServers = useAppSelector(selectNtpServers);
|
||||
|
||||
const stepValidation = useTimezoneValidation();
|
||||
|
||||
return (
|
||||
<FormGroup isRequired={false} label="NTP servers">
|
||||
<ChippingInput
|
||||
|
|
@ -24,6 +27,8 @@ const NtpServersInput = () => {
|
|||
item="NTP server"
|
||||
addAction={addNtpServer}
|
||||
removeAction={removeNtpServer}
|
||||
stepValidation={stepValidation}
|
||||
fieldName="ntpServers"
|
||||
/>
|
||||
</FormGroup>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue