mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
fixed smart float validation when float field is not required
This commit is contained in:
parent
942b39f284
commit
61b307890d
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user