I upgraded a pfsense box from 1.2.3 to 2.0 and ran into this error when I tried to update some legacy static leases that used "subdomain.domain" notation. I resolved it by commenting out the PHP code that generates this error.
To disable the offending PHP code:
Enable SSH (System->Advanced->Enable Secure Shell)
SSH into your pfsense box.
Backup the php file: (cp /usr/local/www/services_dhcp_edit.php /usr/local/www/services_dhcp_edit.php.orig)
Open the php file: (vi /usr/local/www/services_dhcp_edit.php)
Locate lines 122-126:
} else {
if (strpos($_POST['hostname'],'.')) {
$input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted");
}
}
Comment them out like this:
} /* else {
if (strpos($_POST['hostname'],'.')) {
$input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted");
}
}*/
Save the file.
Make sure that you do not comment out the entire line 122–the very first brace on that line closes the block of code above it. Also, test your change by adding a static DHCP lease from the web interface before you close your ssh session.