Description
When adding a DHCP reservation, the MAC address value is passed directly to the backend API without any client-side validation. Invalid MAC addresses may cause API errors that are not surfaced clearly to the user.
Root Cause
In lib/page/dhcp/views/components/usp_dhcp_reservations_detail_card.dart, _showAddDialog() takes the dialog result and passes result.mac directly to addReservation() without validation. The dialog itself (dhcp_reservation_edit_dialog.dart) lacks format validation — contrast this with the Single Port forwarding dialog which has real-time inline validation and a disabled submit button when the form is invalid.
Expected Behavior
The reservation dialog should validate the MAC address format before allowing submission, and display an inline error message for invalid input. The "Add" / "Save" button should be disabled when the form contains validation errors.
Description
When adding a DHCP reservation, the MAC address value is passed directly to the backend API without any client-side validation. Invalid MAC addresses may cause API errors that are not surfaced clearly to the user.
Root Cause
In
lib/page/dhcp/views/components/usp_dhcp_reservations_detail_card.dart,_showAddDialog()takes the dialog result and passesresult.macdirectly toaddReservation()without validation. The dialog itself (dhcp_reservation_edit_dialog.dart) lacks format validation — contrast this with the Single Port forwarding dialog which has real-time inline validation and a disabled submit button when the form is invalid.Expected Behavior
The reservation dialog should validate the MAC address format before allowing submission, and display an inline error message for invalid input. The "Add" / "Save" button should be disabled when the form contains validation errors.