iit2011081
iit2011081

Reputation: 752

How to apply max word count validation on text-angular

The below code is for character validation. Now I want same type of validation for maximum word.

<text-angular ta-toolbar="[['undo','redo'], ['bold','italics','underline'], ['justifyLeft','justifyCenter','justifyRight','justifyFull'], ['wordcount']]" ng-model="description" name = "desc" ta-max-text="20" ></text-angular><br />

<span ng-show="form.desc.$error.taMaxText">Input is too long!</span>

In other words I want an alternative of "ta-max-text" for max words. Any inbuilt or custom validator for same ?

Upvotes: 0

Views: 1863

Answers (1)

Ilan Coulon
Ilan Coulon

Reputation: 1146

As you've done with "taMaxText", you must build your own directive or just use one someone already made...

Upvotes: 1

Related Questions