more module updates

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-20 18:21:45 +02:00
parent cde7b73a73
commit 322dd995bf
25 changed files with 747 additions and 308 deletions

View File

@@ -376,7 +376,10 @@ function variable_format_multiple($variable, $options = array()) {
* Validate numeric variable.
*/
function variable_validate_number($variable) {
if (!is_numeric($variable['value'])) {
if (empty($variable['required']) && empty($variable['value'])) {
return;
}
elseif (!is_numeric($variable['value'])) {
return t('The value is not a number.');
}
}