Skip to content

fix: [DHCP Settings] MAC address input field lacks format validation #750

Description

@PeterJhongLinksys

Description

The DHCP reservation dialog does not validate MAC address format. The input field only checks whether the value is non-empty, allowing any arbitrary string to be submitted. The hint text displays the expected format (AA:BB:CC:DD:EE:FF) but this is not enforced.

Root Cause

In lib/page/dhcp/views/dialogs/dhcp_reservation_edit_dialog.dart, the _submit() method only performs an emptiness check:

if (mac.isEmpty || ip.isEmpty) return;

No MACAddressRule or format regex is applied before returning the result.

Expected Behavior

The MAC address field should validate against the standard MAC format (XX:XX:XX:XX:XX:XX) and display an inline error message when the input is invalid.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions