2
說我有以下形式:表單驗證drop-model對象?
<form>
<input type="text" required ng-model='myValue' ng-maxlength='5'></input>
{{myValue}}
{{myValue.length}}
</form>
當在輸入文本的長度超過最大長度,該模型變空。有沒有辦法在應用此驗證時防止這種行爲,而無需滾動自定義表單級別驗證器?