function backup_migrate_destination_files::edit_form_validate in Backup and Migrate 7.2
Same name and namespace in other branches
- 8.2 includes/destinations.file.inc \backup_migrate_destination_files::edit_form_validate()
- 8.3 includes/destinations.file.inc \backup_migrate_destination_files::edit_form_validate()
- 6.3 includes/destinations.file.inc \backup_migrate_destination_files::edit_form_validate()
- 6.2 includes/destinations.file.inc \backup_migrate_destination_files::edit_form_validate()
- 7.3 includes/destinations.file.inc \backup_migrate_destination_files::edit_form_validate()
Validate the form for the settings for the files destination.
Overrides backup_migrate_item::edit_form_validate
File
- includes/
destinations.file.inc, line 155 - A destination type for saving locally to the server.
Class
- backup_migrate_destination_files
- A destination type for saving locally to the server.
Code
function edit_form_validate($form, &$form_state) {
$values = $form_state['values'];
if (isset($values['settings']['chmod']) && !empty($values['settings']['chmod']) && !preg_match('/0?[0-7]{3}/', $values['settings']['chmod'])) {
form_set_error('chmod', t('You must enter a valid chmod octal value (e.g. 644 or 0644) in the change mode field, or leave it blank.'));
}
parent::edit_form_validate($form, $form_state);
}