added regex patterns on inputs

This commit is contained in:
Adrian 2025-01-25 19:37:31 -06:00
parent 682b5911e8
commit 58c5875aa7
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,7 @@ function UpdateUsbConfigModal({
required required
label="Vendor ID" label="Vendor ID"
placeholder="Enter Vendor ID" placeholder="Enter Vendor ID"
pattern="^0[xX][\da-fA-F]{4}$"
defaultValue={usbConfigState?.vendor_id} defaultValue={usbConfigState?.vendor_id}
onChange={e => handleUsbVendorIdChange(e.target.value)} onChange={e => handleUsbVendorIdChange(e.target.value)}
/> />
@ -149,6 +150,7 @@ function UpdateUsbConfigModal({
required required
label="Product ID" label="Product ID"
placeholder="Enter Product ID" placeholder="Enter Product ID"
pattern="^0[xX][\da-fA-F]{4}$"
defaultValue={usbConfigState?.product_id} defaultValue={usbConfigState?.product_id}
onChange={e => handleUsbProductIdChange(e.target.value)} onChange={e => handleUsbProductIdChange(e.target.value)}
/> />