fixed smart float validation when float field is not required

This commit is contained in:
Michael Abashian 2017-06-27 17:21:20 -04:00
parent 942b39f284
commit 61b307890d

View File

@ -355,7 +355,7 @@ function(ConfigurationUtils, i18n, $rootScope) {
require: 'ngModel',
link: function(scope, elm, attrs, ctrl) {
ctrl.$parsers.unshift(function(viewValue) {
if (FLOAT_REGEXP.test(viewValue)) {
if (viewValue === '' || FLOAT_REGEXP.test(viewValue)) {
ctrl.$setValidity('float', true);
return parseFloat(viewValue.replace(',', '.'));
} else {