isNumber is valid with < 0
This commit is contained in:
parent
b331e5870c
commit
537c8eca82
@ -91,7 +91,7 @@
|
||||
|
||||
<dt><label for="timeoffset"> {$panelstrings.timeoffset} </label></dt>
|
||||
<dd><input type="text" name="timeoffset" id="timeoffset"
|
||||
class="smalltextinput{$error.maxentries|notempty:" field-error"}"
|
||||
class="smalltextinput{$error.timeoffset|notempty:" field-error"}"
|
||||
value="{$fp_config.locale.timeoffset}" /> {$panelstrings.hours}
|
||||
</dd>
|
||||
|
||||
|
@ -37,7 +37,7 @@ function smarty_validate_criteria_isNumber($value, $empty, &$params, &$formvars)
|
||||
if(strlen($value) == 0)
|
||||
return $empty;
|
||||
|
||||
return preg_match('!^\d+(\.\d+)?$!', $value);
|
||||
return preg_match('!^-?\d+(\.\d+)?$!', $value);
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user