From 66b1d2d28f46b514c066c7cd07eeb29900797b91 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Tue, 11 Aug 2015 17:18:49 -0400 Subject: [PATCH] include -0 as an invalid integer in the context of this directive --- awx/ui/client/src/shared/directives.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/shared/directives.js b/awx/ui/client/src/shared/directives.js index e19de92e60..cc2b2fd0cb 100644 --- a/awx/ui/client/src/shared/directives.js +++ b/awx/ui/client/src/shared/directives.js @@ -275,7 +275,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job if (/^\-?\d*$/.test(viewValue)) { // it is valid ctrl.$setValidity('integer', true); - if ( viewValue === '-' || viewValue === '' || viewValue === null) { + if ( viewValue === '-' || viewValue === '-0' || viewValue === '' || viewValue === null) { ctrl.$setValidity('integer', false); return viewValue; }