function jplayer_protect_settings_form_validate in jPlayer 7.2
Same name and namespace in other branches
- 6 jplayer_protect/jplayer_protect.admin.inc \jplayer_protect_settings_form_validate()
Validate the access time setting.
1 string reference to 'jplayer_protect_settings_form_validate'
- jplayer_protect_settings_form in jplayer_protect/
jplayer_protect.admin.inc - Settings form for enabling jPlayer protection.
File
- jplayer_protect/
jplayer_protect.admin.inc, line 92 - Page callback for the jPlayer protection statistics page.
Code
function jplayer_protect_settings_form_validate($form, &$form_state) {
$time = $form_state['values']['jplayer_protect_access_time'];
if ($form_state['values']['jplayer_protect'] && !is_numeric($time)) {
form_error($form['jplayer_protect_access_time'], t('Access time must be a value in seconds.'));
}
if (intval($time) < 0) {
form_error($form['jplayer_protect_access_time'], t('Access time must be at least 0 seconds.'));
}
}