profile_validate_form
- Versions
- 4.6
profile_validate_form($edit)
Code
modules/profile.module, line 410
<?php
function profile_validate_form($edit) {
// Validate the title:
if (!$edit['title']) {
form_set_error('title', t('You must enter a title.'));
}
// Validate the 'form name':
if (eregi('[^a-z0-9_-]', $edit['name'])) {
form_set_error('name', t('The specified form name contains one or more illegal characters. Spaces or any other special characters expect dash (-) and underscore (_) are not allowed.'));
}
if (in_array($edit['name'], user_fields())) {
form_set_error('name', t('The specified form name is reserved for use by Drupal.'));
}
// Validate the category:
if (!$edit['category']) {
form_set_error('category', t('You must enter a category.'));
}
}
?>Login or register to post comments 