title: Create Custom validation Class in javaScript/Jquery
body: <p>Let say there is an input element field and <strong>i want to create a new validation class</strong> <strong>myClass</strong> ,that i can insert with any html element that might performing some function and also setting attribute such as </p>
  
  <pre><code>readonly="true"
  required='true'.
  </code></pre>
  
  <p>HTML is</p>
  
  <pre><code>&lt;td&gt;
     &lt;input type="text" id="endDate" name ="endDate" class="select_200" required readonly="true"&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Now rather setting elements separately need one class for performing: </p>
  
  <blockquote>
    <p>A function check <code>"let say character count less then 10"</code> and setting
    attribute.</p>
    
    <p>Setting attributes such as readonly ,required</p>
  </blockquote>
  
  <p><strong>So that i can add that class to all elements with similar property.</strong> </p>
  
  <blockquote>
    <p>Validation + Setting/ Reseting attributes by adding class only</p>
  </blockquote>