mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +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)) {
|
if (/^\-?\d*$/.test(viewValue)) {
|
||||||
// it is valid
|
// it is valid
|
||||||
ctrl.$setValidity('integer', true);
|
ctrl.$setValidity('integer', true);
|
||||||
if ( viewValue === '-' || viewValue === '' || viewValue === null) {
|
if ( viewValue === '-' || viewValue === '-0' || viewValue === '' || viewValue === null) {
|
||||||
ctrl.$setValidity('integer', false);
|
ctrl.$setValidity('integer', false);
|
||||||
return viewValue;
|
return viewValue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user