regex validations for textarea angular
<p>I would like to validate a my textarea field using regex in my angular app.  but their will be a certain conditions for textarea. 
    <ul>
    <ol>1. Message should not be more than 500 characters.</ol>
    <ol>2. Text should not consecutive space characters.</ol>
    <ol>3. No word should be more than 20 characters.</ol>
    <ol>4. There should not be consecutive special characters.</ol>
    </ul></p>

<pre><code>&lt;textarea id="message" name="message" type="text" placeholder="" required="" ng-maxlength="500" ng-model="message" ng-pattern="/^[a-zA-Z0-9]{5}$/" class="form-control"&gt;&lt;/textarea&gt;
</code></pre>

<p>any help will be appreciated.</p>