Skip to content

Commit

Permalink
fix: Renamed IP addres in form to IP addres/Group
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekzyla committed Sep 22, 2022
1 parent 7a82789 commit 31c8cc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function AddInventoryModal() {
<Modal onRequestClose={handleRequestClose} open={InvCtx.addOpen} style={{ width: '600px' }}>
<Modal.Header title={((InvCtx.isEdit) ? `Edit device` : "Add a new device")} onRequestClose={handleRequestClose} />
<Modal.Body>
<ControlGroup label="IP address">
<ControlGroup label="IP address/Group">
<div style={validation_group}>
<Text value={InvCtx.address} onChange={handleChangeAddress}/>
{((addressErrors) ? addressErrors.map((el) => <P key={createDOMID()} style={validation_message}>{el}</P>) : <P/>)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const validateInventory = (address, port, version, community, secret,

// Validate address
if (address.length === 0){
errors.address.push("Address is required");
errors.address.push("Address or Group is required");
isValid = false;
}else if (Number.isInteger(Number(address.charAt(0)))){
let doesMatch = address.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/);
Expand Down

0 comments on commit 31c8cc5

Please sign in to comment.