static/bower_components/angular-schema-form/dist/schema-form.js
function(viewValue) {
          //console.log('validate called', viewValue)
          //Still might be undefined
          if (!form) {
            return viewValue;
          }

          // Omit TV4 validation
          if (scope.options && scope.options.tv4Validation === false) {
            return viewValue;
          }

          var result =  sfValidator.validate(form, viewValue);
          //console.log('result is', result)
          // Since we might have different tv4 errors we must clear all
          // errors that start with tv4-
          Object.keys(ngModel.$error)
              .filter(function(k) { return k.indexOf('tv4-') === 0; })
              .forEach(function(k) { ngModel.$setValidity(k, true); });

          if (!result.valid) {
            // it is invalid, return undefined (no model update)
            ngModel.$setValidity('tv4-' + result.error.code, false);
            error = result.error;

            // In Angular 1.3+ return the viewValue, otherwise we inadvertenly
            // will trigger a 'parse' error.
            // we will stop the model value from updating with our own $validator
            // later.
            if (ngModel.$validators) {
              return viewValue;
            }
            // Angular 1.2 on the other hand lacks $validators and don't add a 'parse' error.
            return undefined;
          }
          return viewValue;
        }
function(viewValue) {
          //console.log('validate called', viewValue)
          //Still might be undefined
          if (!form) {
            return viewValue;
          }

          // Omit TV4 validation
          if (scope.options && scope.options.tv4Validation === false) {
            return viewValue;
          }

          var result =  sfValidator.validate(form, viewValue);
          //console.log('result is', result)
          // Since we might have different tv4 errors we must clear all
          // errors that start with tv4-
          Object.keys(ngModel.$error)
              .filter(function(k) { return k.indexOf('tv4-') === 0; })
              .forEach(function(k) { ngModel.$setValidity(k, true); });

          if (!result.valid) {
            // it is invalid, return undefined (no model update)
            ngModel.$setValidity('tv4-' + result.error.code, false);
            error = result.error;

            // In Angular 1.3+ return the viewValue, otherwise we inadvertenly
            // will trigger a 'parse' error.
            // we will stop the model value from updating with our own $validator
            // later.
            if (ngModel.$validators) {
              return viewValue;
            }
            // Angular 1.2 on the other hand lacks $validators and don't add a 'parse' error.
            return undefined;
          }
          return viewValue;
        }
function ( viewValue ) { //console.log('validate called', viewValue) //Still might be undefined if ( ! form ) { return viewValue ; } // Omit TV4 validation if ( scope . options && scope . options . tv4Validation === false ) { return viewValue ; } var result = sfValidator . validate ( form , viewValue ) ; //console.log('result is', result) // Since we might have different tv4 errors we must clear all // errors that start with tv4- Object . keys ( ngModel . $error ) . filter ( function ( k ) { return k . indexOf ( 'tv4-' ) === 0 ; } ) . forEach ( function ( k ) { ngModel . $setValidity ( k , true ) ; } ) ; if ( ! result . valid ) { // it is invalid, return undefined (no model update) ngModel . $setValidity ( 'tv4-' + result . error . code , false ) ; error = result . error ; // In Angular 1.3+ return the viewValue, otherwise we inadvertenly // will trigger a 'parse' error. // we will stop the model value from updating with our own $validator // later. if ( ngModel . $validators ) { return viewValue ; } // Angular 1.2 on the other hand lacks $validators and don't add a 'parse' error. return undefined ; } return viewValue ; }
Validate against the schema.
Validate against the schema .