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.
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:No
MACAddressRuleor 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.