breeze.directives.js
function createGetValErrs(info) {
            return function () {
                var aspect = info.getEntityAspect();
                if (aspect) {
                    var errs = aspect.getValidationErrors(info.propertyPath);
                    if (errs.length) {
                        return errs
                            // concatenate all errors into a single string
                            .map(function (e) { return e.errorMessage; })
                            .join('; ');
                    }
                    return '';
                }
                // No data bound entity yet.
                // Return something other than a string so that
                // watch calls `valErrsChanged` when an entity is bound
                return null;
            };
        }
function createGetValErrs(info) {
            return function () {
                var aspect = info.getEntityAspect();
                if (aspect) {
                    var errs = aspect.getValidationErrors(info.propertyPath);
                    if (errs.length) {
                        return errs
                            // concatenate all errors into a single string
                            .map(function (e) { return e.errorMessage; })
                            .join('; ');
                    }
                    return '';
                }
                // No data bound entity yet.
                // Return something other than a string so that
                // watch calls `valErrsChanged` when an entity is bound
                return null;
            };
        }
function createGetValErrs ( info ) { return function ( ) { var aspect = info . getEntityAspect ( ) ; if ( aspect ) { var errs = aspect . getValidationErrors ( info . propertyPath ) ; if ( errs . length ) { return errs // concatenate all errors into a single string . map ( function ( e ) { return e . errorMessage ; } ) . join ( '; ' ) ; } return '' ; } // No data bound entity yet. // Return something other than a string so that // watch calls `valErrsChanged` when an entity is bound return null ; } ; }
Create the 'getValErrs' function that will be watched
Create the getValErrs function that will be watched