diff --git a/awx/ui/client/lib/components/input/base.controller.js b/awx/ui/client/lib/components/input/base.controller.js index eabd536e34..9a08ed0f2e 100644 --- a/awx/ui/client/lib/components/input/base.controller.js +++ b/awx/ui/client/lib/components/input/base.controller.js @@ -12,7 +12,13 @@ function BaseInputController (strings) { scope.state._touched = false; scope.state._required = scope.state.required || false; - scope.state._isValid = scope.state._isValid || false; + + if (scope.state.type === 'boolean') { + scope.state._isValid = scope.state._isValid || true; + } else { + scope.state._isValid = scope.state._isValid || false; + } + scope.state._disabled = scope.state._disabled || false; scope.state._activeModel = scope.state._activeModel || '_value'; @@ -59,6 +65,10 @@ function BaseInputController (strings) { scope.state._touched = true; } + if (scope.state.type === 'boolean') { + return { isValid, message }; + } + if (scope.state._required && (!scope.state._value || !scope.state._value[0]) && !scope.state._displayValue) { isValid = false;