Project

General

Profile

« Previous | Next » 

Revision 522e3f91

Added by Jim Pingle over 2 years ago

DHCP6 Adv field validation errors. Fixes #13493

A few fields were being validated but not informing the user when the
values were bad. This commit lets the user know when they have entered
invalid data in the affected fields.

View differences:

src/usr/local/www/interfaces.php
694 694
			if ($_POST['dhcp6-ia-pd-send-hint'] && strtolower($_POST['dhcp6-ia-pd-len']) == 'none') {
695 695
				$input_errors[] = gettext('DHCPv6 Prefix Delegation size must be provided when Send IPv6 prefix hint flag is checked');
696 696
			}
697
			if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_id']) &&
698
			    !is_numericint($_POST['adv_dhcp6_id_assoc_statement_address_id'])) {
699
				$input_errors[] = gettext('DHCPv6 advanced id-assoc na ID value must be empty or an integer.');
700
			}
701
			if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_id']) &&
702
			    !is_numericint($_POST['adv_dhcp6_id_assoc_statement_prefix_id'])) {
703
				$input_errors[] = gettext('DHCPv6 advanced id-assoc pd ID value must be empty or an integer.');
704
			}
705
			if (!empty($_POST['adv_dhcp6_prefix_interface_statement_sla_id']) &&
706
			    !is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_id'])) {
707
				$input_errors[] = gettext('DHCPv6 advanced Prefix Interface sla-id value must be empty or an integer.');
708
			}
709
			if (!empty($_POST['adv_dhcp6_prefix_interface_statement_sla_len']) &&
710
			    !is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_len'])) {
711
				$input_errors[] = gettext('DHCPv6 advanced Prefix Interface sla-len value must be empty or an integer.');
712
			}
697 713
			break;
698 714
		case "6rd":
699 715
			foreach ($ifdescrs as $ifent => $ifdescr) {

Also available in: Unified diff