[FIX] Fixed float validation regex
bzr revid: fme@openerp.com-20110406095642-zzo7j178iqancfsk
This commit is contained in:
parent
f600eceb31
commit
c6115e1637
|
@ -466,7 +466,7 @@ openerp.base.form.FieldFloat = openerp.base.form.FieldChar.extend({
|
|||
on_ui_change: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.value = this.$element.find('input').val().replace(/,/g, '.');
|
||||
this.invalid = (this.required && this.value == "") || !this.value.match(/^\d(\.\d)?$/) ;
|
||||
this.invalid = (this.required && this.value == "") || !this.value.match(/^\d+(\.\d+)?$/) ;
|
||||
this.view.on_form_changed(this);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue