Ox.Input: fix integer regexp
This commit is contained in:
parent
d930affb05
commit
cfa16327a5
1 changed files with 1 additions and 1 deletions
|
@ -546,7 +546,7 @@ Ox.Input = function(options, self) {
|
||||||
'(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+\\.?\\d'
|
'(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+\\.?\\d'
|
||||||
+ (self.options.decimals ? '{0,' + self.options.decimals + '}' : '*')
|
+ (self.options.decimals ? '{0,' + self.options.decimals + '}' : '*')
|
||||||
+ '$)'
|
+ '$)'
|
||||||
) : new RegExp('(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+)');
|
) : new RegExp('(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+$)');
|
||||||
if (type == 'float') {
|
if (type == 'float') {
|
||||||
if (value === '') {
|
if (value === '') {
|
||||||
value = '0.' + self.decimals;
|
value = '0.' + self.decimals;
|
||||||
|
|
Loading…
Reference in a new issue