Cribbed from Party:
// Only allow word characters and hyphens.
// TODO: make this match accented characters.
if (preg_match('/[^\w-]/', $form_state['values']['party_piece_path'])) {
form_error($form['party_piece_path'], t('The path may only contain letters, numbers, underscores, and hyphens.'));
}
// Check for duplicate paths.
$pieces = party_get_party_piece_info();
if (isset($pieces[$form_state['values']['party_piece_path']])) {
form_error($form['party_piece_path'], t('The path already exists.'));
}
We probably don't want the duplicate paths validation, as we intentionally allow Views displays to override hardcoded operation paths. But we definitely need the first.
Comments
Comment #1
joachim commentedFigured out the accents with Stack Overflow ;)