function backup_migrate_schedule::edit_form_validate in Backup and Migrate 6.2
Same name and namespace in other branches
- 8.2 includes/schedules.inc \backup_migrate_schedule::edit_form_validate()
- 8.3 includes/schedules.inc \backup_migrate_schedule::edit_form_validate()
- 6.3 includes/schedules.inc \backup_migrate_schedule::edit_form_validate()
- 7.3 includes/schedules.inc \backup_migrate_schedule::edit_form_validate()
- 7.2 includes/schedules.inc \backup_migrate_schedule::edit_form_validate()
Submit the edit form.
Overrides backup_migrate_item::edit_form_validate
File
- includes/
schedules.inc, line 276
Class
- backup_migrate_schedule
- A schedule class for crud operations.
Code
function edit_form_validate($form, &$form_state) {
if (!is_numeric($form_state['values']['period']['number']) || $form_state['values']['period']['number'] <= 0) {
form_set_error('period][number', t('Backup period must be a number greater than 0.'));
}
if (!is_numeric($form_state['values']['keep']) || $form_state['values']['keep'] < 0) {
form_set_error('keep', t('Number to keep must be an integer greater than or equal to 0.'));
}
parent::edit_form_validate($form, $form_state);
}