function feeds_tamper_math_validate in Feeds Tamper 6
Same name and namespace in other branches
- 7 plugins/math.inc \feeds_tamper_math_validate()
File
- plugins/
math.inc, line 42
Code
function feeds_tamper_math_validate(&$settings) {
if (!is_numeric($settings['value'])) {
form_set_error('settings][value', t('The value must be numeric.'));
}
elseif ($settings['operation'] == 'division' && $settings['value'] == 0) {
form_set_error('settings][value', t('Cannot divide by zero.'));
}
}