function ultimate_cron_validate_rule in Ultimate Cron 7.2
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_validate_rule()
- 6 ultimate_cron.module \ultimate_cron_validate_rule()
- 7 ultimate_cron.module \ultimate_cron_validate_rule()
Check if rule is valid.
Parameters
string $rule: The rule to validate.
Return value
bool TRUE if valid, FALSE if not.
1 call to ultimate_cron_validate_rule()
- ultimate_cron_plugin_crontab_element_validate_rule in ./
ultimate_cron.module - Form element validator for cron rules.
File
- ./
ultimate_cron.module, line 1564
Code
function ultimate_cron_validate_rule($rule) {
$cron = CronRule::factory($rule);
if (!$cron
->isValid()) {
return FALSE;
}
else {
return TRUE;
}
}