Please i am confused trying to use the utils' validator

This is what i tried

//html
 <textarea required ng-model="abstract" name="content"
data-provide="markdown" rows="10" ui-validate="{count:
'validateCount(countOff($value) <= 250)' }"></textarea>

                        <span
ng-show="sectionOneFrm.content.$error.required" class="text-danger">Please
enter/paste the Abstract</span>
//js
$scope.countOf = function (text) {
        var s = text ? text.split(/\s+/) : 0; // it splits the text on
space/tab/enter
        return s ? s.length : '';
    };

I am trying to make sure the count of words is not more than 250 words.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to