title: AngularJS remote validation with kendo-validator
body: <p>I am new in angular-js. I am developing my app with angular-kendo. I followed <a href="http://kendo-labs.github.io/angular-kendo/#/Validator" rel="nofollow noreferrer">http://kendo-labs.github.io/angular-kendo/#/Validator</a> </p>
  
  <p>Before implement the in my real project I implement it in my text project. Look at my view:</p>
  
  <pre><code>  &lt;form role="form" name="formTimeLine" kendo-validator="validator" 
    k-options="myValidatorOptions"&gt;
    &lt;p&gt;{{Welcome}}&lt;/p&gt;
     &lt;span class="label required"&gt;Name:&lt;/span&gt;
    &lt;input type="remarks" name="remarks" class="k-textbox" 
    ng-model="fiscalYear.Remarks" data-test="Please write sabbir."/&gt;&lt;br&gt;
     &lt;span data-for='remarks' class='k-invalid-msg'&gt;&lt;/span&gt;
    &lt;button ng-click="Save()"&gt;Save&lt;/button&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>My validation rules in controller is as </p>
  
  <pre><code> $scope.myValidatorOptions = {
    rules: {
      test: function (input) {
          if (input.is("[name=remarks]")) {
  
              return input.val() == "Sabbir"
          } else {
              return true;
          }
      }
    },
    messages: {
      test: "Your UserName must be Sabbir"
  }
  };
  </code></pre>
  
  <p>My save function is as follows</p>
  
  <pre><code> $scope.Save = function () {
   if ($scope.validator.validate()) {
      alert("Saved");
   }
   else {
      alert("Error");
   }
   };
  </code></pre>
  
  <p>How can I wire up a rule with kendo-validator so that remote validation will be called and validate? It is said to use custom directive and <code>ctrl.$setValidity('unique', false);</code> but calling <code>$scope.validator.validate()</code> return true. I want <a href="http://blog.brunoscopelliti.com/form-validation-the-angularjs-way" rel="nofollow noreferrer">http://blog.brunoscopelliti.com/form-validation-the-angularjs-way</a> with kendo-validator.</p>