function tinymce_profile_validate in TinyMCE 5.2
Same name and namespace in other branches
- 5 tinymce.module \tinymce_profile_validate()
- 6.2 tinymce.admin.inc \tinymce_profile_validate()
- 6 tinymce.admin.inc \tinymce_profile_validate()
Profile validation.
1 call to tinymce_profile_validate()
- tinymce_admin in ./
tinymce.module - Controller for tinymce administrative settings.
File
- ./
tinymce.module, line 1052 - Integrate the TinyMCE editor (http://tinymce.moxiecode.com/) into Drupal.
Code
function tinymce_profile_validate($edit) {
$errors = array();
if (!$edit['name']) {
$errors['name'] = t('You must give a profile name.');
}
if (!$edit['rids']) {
$errors['rids'] = t('You must select at least one role.');
}
foreach ($errors as $name => $message) {
form_set_error($name, $message);
}
return count($errors) == 0;
}