cakephp 3.2中的echo buildrules错误

时间:2016-10-10 12:19:04

标签: cakephp cakephp-3.2

我正在尝试保存数据,但是在错误()中它没有显示任何内容,但仍然save()方法返回false。经过一些研究,我发现它是由于buildRule的失败

.directive('svgImage', ['$http', '$compile', function($http, $compile) {
  return {
    restrict: 'E',
    link: function(scope, element, attrs) {
      var imgURL = element.attr('src');
      // if you want to use ng-include, then
      // instead of the above line write the bellow:
      // var imgURL = element.attr('ng-include');
      var request = $http.get(
        imgURL,
        {'Content-Type': 'application/xml'}
      );

      scope.manipulateImgNode = function(data, elem){
        var $svg = angular.element(data)[4];
        var imgClass = elem.attr('class');
        if(typeof(imgClass) !== 'undefined') {
          var classes = imgClass.split(' ');
          for(var i = 0; i < classes.length; ++i){
            $svg.classList.add(classes[i]);
          }
        }
        $svg.removeAttribute('xmlns:a');
        angular.element($svg).attr("ng-click", attrs.ngClick);
        return $compile($svg)(scope);
      };

      request.success(function(data){
        element.replaceWith(scope.manipulateImgNode(data, element));
      });
    }
  };
}]);

有没有人知道如何在cakephp 3.2中查看buildrules错误 error()方法仅显示验证错误。

0 个答案:

没有答案