私はangularjsにhtmlを使ってコードを書いています。このMINLENGTHとMAXLENGTH検証に.here私のコード HTMLコードを作業されていません。なぜminlengthとmaxlength検証が機能していないのですか?
<input type="text" id="healthcomplaint" ng-model="userDetails.healthcomplaint" style="color:#4a5665;" class="form-control" name="healthcomplaint" ng-required="true" ng-minlength="3" ng-maxlength="120" ng-pattern="/^[a-zA-Z0-9\s\[\]\.,\_\/\-#']*$/" tabindex="8">
<span class="ng-hide error_txt" ng-show="submitted && info.healthcomplaint.$error.required">Please enter health complaint.</span>
<span class="ng-hide error_txt" ng-show="info.healthcomplaint.$error.minlength">health complaint should have at least 3 characters.</span>
<span class="ng-hide error_txt" ng-show="info.healthcomplaint.$error.maxlength">health complaint should not exceed 120 characters.</span>
で
submitted &&
を交換しますが、周囲のフォームのHTMLを含めることはできますか?あなたがここにあるものに根本的に間違っているものは何もありません( 'ng-required =" true "'は重複しますが動作します) – jdphenixthnk u、しかし動作しません。plsは代用を教えてください – shiv
** HTMLフォーム?**およびブラウザコンソールからのエラー(ある場合) – jdphenix