mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Merge pull request #6755 from mabashian/1982-fix-smart-float-validation
fixed smart float validation when float field is not required
This commit is contained in:
commit
6dd507a8fc
@ -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…
Reference in New Issue
Block a user