function backup_migrate_ui_schedule_configure_form_validate in Backup and Migrate 5.2
Validate the schedule configuration form.
File
- includes/
schedules.inc, line 282 - All of the schedule handling code needed for Backup and Migrate.
Code
function backup_migrate_ui_schedule_configure_form_validate($form_id, $form_values) {
if (!is_numeric($form_values['period']['number']) || $form_values['period']['number'] <= 0) {
form_set_error('[period][number]', t('Backup period must be a number greater than 0.'));
}
if (!is_numeric($form_values['keep']) || $form_values['keep'] < 0) {
form_set_error('[keep]', t('Number to keep must be an integer greater than or equal to 0.'));
}
}