errors : {"parse":true"} prevent enable submit button in AngularJs
<p>Hi Dear All AngularJs lovers,</p>

<p>i am fetching a  angularjs problem in from validation.
i create directive for pattern validation, length validation and also check data are exits in database </p>

<p>in submit button i use <strong>ng-disable='frm.$invalid'</strong> but though my all input field are valid, my submit button shows still disable , because i get   errors : {"parse":true"}</p>

<p>if it shows like that <strong>errors : {" "}</strong> then my submit button enable 
how can i solved it.</p>

<p>my HTML UI it look like</p>

<pre><code> &lt;div class="row"&gt;
                        &lt;label for="f1_normal_input"&gt;
                            &lt;strong&gt;Country Code &lt;/strong&gt;
                        &lt;/label&gt;
                        &lt;div  style="margin-left: 196px;"&gt;
                          &lt;input ng-required="true"
                              ng-class="{'error': !!frm.countrycode.$error.isBlank || !!frm.countrycode.$error.invalidLen || !!frm.countrycode.$error.isvalidPattern || !!frm.countrycode.$error.requiredUniquevalue,
                              'valid':!!frm.countrycode.$dirty &amp;&amp; !frm.countrycode.$error.isBlank &amp;&amp; !frm.countrycode.$error.invalidLen &amp;&amp; !frm.countrycode.$error.isvalidPattern  &amp;&amp; !!frm.countrycode.$error.requiredUniquevalue}" id="CustomerCode" name="countrycode" ng-model="Country.country_code" type="text"  valid-code /&gt;
                                errors : {{frm.countrycode.$error}}
                             &lt;div class="help-inline"&gt;
                                &lt;div class="error-icon icon" ng-show="!!frm.countrycode.$error.isBlank" style="right: 5.99998px; top: 33.5px;"&gt;&lt;/div&gt;
                                &lt;label ng-show="!!frm.countrycode.$error.isBlank" for="v1_normal_input" generated="true" class="error " style="right: -0.000349609px; top: 55px;"&gt;This field is required.&lt;/label&gt;
                                &lt;label class="error inline" ng-show="!!frm.countrycode.$error.invalidLen"&gt;Must be 2-3 characters.&lt;/label&gt;
                                &lt;label class="error inline" ng-show="!!frm.countrycode.$error.isvalidPattern"&gt;Pattern is not matched exeample(USA)!!&lt;/label&gt;
                                &lt;div class="valid-icon icon" ng-show="!!frm.countrycode.$dirty &amp;&amp; !frm.countrycode.$error.isBlank &amp;&amp; !frm.countrycode.$error.invalidLen &amp;&amp; !frm.countrycode.$error.isvalidPattern &amp;&amp; !!frm.countrycode.$error.requiredUniquevalue" style="right: 5.99998px; top: 33.5px;"&gt;&lt;/div&gt;
                                &lt;label class="error inline" ng-show="!!frm.countrycode.$dirty &amp;&amp; !frm.countrycode.$error.isBlank &amp;&amp; !frm.countrycode.$error.requiredUniquevalue"&gt;This country is already exits !!.&lt;/label&gt;

                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;``
</code></pre>

<p>and my directives look like</p>

<pre><code>angular.module('UserValidation', []).directive('validCode', function($http) {
    return {
        require: 'ngModel',
        link: function (scope, elm, attrs, ctrl) {
            ctrl.$parsers.unshift(function (viewValue) {

                var isBlank = viewValue === '';
                var invalidLen = !isBlank &amp;&amp; (viewValue.length &lt; 2 || viewValue.length &gt; 3);
                var isvalidPattern = !isBlank &amp;&amp; !invalidLen &amp;&amp; !/^[A-Z]{2,3}/.test(viewValue);
                ctrl.$setValidity('isBlank', !isBlank);
                ctrl.$setValidity('invalidLen', !invalidLen);
                ctrl.$setValidity('isvalidPattern', !isvalidPattern);
                $http({
                        method: 'POST',
                        url: '/api/BasicData/CountryCode?code=' + viewValue,
                        data: viewValue
                }).success(function(res) {
                    if (res) {

                            ctrl.$setValidity('requiredUniquevalue', true);//exits in database
                        } else {
                            ctrl.$setValidity('requiredUniquevalue', false);// not exits
                        }
                    }).error(function(err) {
                        ctrl.$setValidity('requiredUniquevalue', false);
                    });
            });
        }
    }
})
</code></pre>

<p>Is there any problem ??</p>