function apachesolr_settings_validate in Apache Solr Search 5.2
Same name and namespace in other branches
- 6 apachesolr.admin.inc \apachesolr_settings_validate()
- 6.2 apachesolr.admin.inc \apachesolr_settings_validate()
Validation function for the apachesolr_settings form.
File
- ./
apachesolr.admin.inc, line 96 - Administrative pages for the Apache Solr framework.
Code
function apachesolr_settings_validate($form_id, $form_values) {
$port = $form_values['apachesolr_port'];
// TODO: Port range should be 0-65535, but 0 crashes apachesolr
if (!ctype_digit($port) || $port < 1 || $port > 65535) {
form_set_error('apachesolr_port', t('The port has to be an integer between 1 and 65535.'));
}
}