MCPcopy Create free account
hub / github.com/apache/cloudstack / toggleValidCss

Function toggleValidCss

tools/ngui/static/js/lib/angular.js:10885–10890  ·  view source on GitHub ↗
(isValid, validationErrorKey)

Source from the content-addressed store, hash-verified

10883
10884 // convenience method for easy toggling of classes
10885 function toggleValidCss(isValid, validationErrorKey) {
10886 validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
10887 element.
10888 removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).
10889 addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
10890 }
10891
10892 form.$addControl = function(control) {
10893 if (control.$name && !form.hasOwnProperty(control.$name)) {

Callers 2

FormControllerFunction · 0.85
angular.jsFile · 0.85

Calls 1

snake_caseFunction · 0.85

Tested by

no test coverage detected