function feeds_tamper_str_pad_validate in Feeds Tamper 6
Same name and namespace in other branches
- 7 plugins/str_pad.inc \feeds_tamper_str_pad_validate()
1 string reference to 'feeds_tamper_str_pad_validate'
- str_pad.inc in plugins/
str_pad.inc
File
- plugins/
str_pad.inc, line 40
Code
function feeds_tamper_str_pad_validate(&$settings) {
if (!ctype_digit($settings['pad_length'])) {
form_set_error('settings][pad_length', t('Pad length field must be an integer.'));
}
else {
$settings['pad_length'] = (int) $settings['pad_length'];
}
if ($settings['pad_string'] === '') {
$settings['real_pad_string'] = ' ';
}
else {
$settings['real_pad_string'] = $settings['pad_string'];
}
}