mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Integer Directive was returning false for a blank string
this was causing the integer directive to throw an error if the user entered something in the field, then erased it.
This commit is contained in:
parent
8e4adfb887
commit
e18791a657
@ -275,7 +275,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
|
||||
if (/^\-?\d*$/.test(viewValue)) {
|
||||
// it is valid
|
||||
ctrl.$setValidity('integer', true);
|
||||
if ( viewValue === '-' || viewValue === '-0' || viewValue === '' || viewValue === null) {
|
||||
if ( viewValue === '-' || viewValue === '-0' || viewValue === null) {
|
||||
ctrl.$setValidity('integer', false);
|
||||
return viewValue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user