mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
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…
x
Reference in New Issue
Block a user