finder_admin_edit_validate
| Versions | |
|---|---|
| 6.x-1.x – 7.x-1.x | finder_admin_edit_validate($form, &$form_state) |
Validate function for admin finder add/edit page.
Code
includes/
<?php
function finder_admin_edit_validate($form, &$form_state) {
$values = &$form_state['values'];
$arg_sep = preg_replace("/[\/\-\_\s]/", "", $values['settings']['advanced']['arg_sep']);
if (!$arg_sep) {
form_set_error('arg_sep', t('Multiple value URL arguments separator must contain at least one character that is not a space ( ), forward-slash (/), hyphen (-), or underscore (_).'));
}
if (!empty($values['settings']['advanced']['empty_symbol'])) {
$empty_symbol = preg_replace("/[\/\-\_\s]/", "", $values['settings']['advanced']['empty_symbol']);
if (!$empty_symbol) {
form_set_error('arg_sep', t('Empty value URL arguments symbol must contain at least one character that is not a space ( ), forward-slash (/), hyphen (-), or underscore (_).'));
}
if ($arg_sep == $empty_symbol) {
form_set_error('empty_symbol', t('The "empty value URL arguments symbol" should not be the same as the "multiple value URL arguments separator".'));
}
}
}
?>

Comments
bFqBXqglWkPMWoBJJoz
There's nothing like the rleief of finding what you're looking for.