mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
include -0 as an invalid integer in the context of this directive
This commit is contained in:
parent
aef95b2c1a
commit
66b1d2d28f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user