title: How to block emoticons from input text field in codeignitier
body: <p>I want to make input text field in such a way that it will block emoticons entry in text input field. I have made validation on controller for particular route by passing.Is it is a right way to block emoticons.</p>
  
  <p>Controller code.</p>
  
  <pre><code>$this-&gt;form_validation-&gt;set_rules('registration', 'Registration', 'required|alpha_numeric');
             $this-&gt;form_validation-&gt;set_rules('odometer', 'Odometer', 'required|alpha_numeric');
  </code></pre>
  
  <p>view code:</p>
  
  <pre><code>&lt;input type="text" name="odometer" placeholder="Odometer" class="form-control profileControl  odometer required number" id="odometer-&lt;?php echo $vehicle_count; ?&gt;" value="&lt;?php echo $vehicle-&gt;intCarOdometer ?&gt;"/&gt;
  
  &lt;input type="text" placeholder="Registration" name="registration" class="form-control profileControl  registration required" id="registration-&lt;?php echo $vehicle_count; ?&gt;" value="&lt;?php echo $vehicle-&gt;vchCarRegistration ?&gt;" pattern="[a-zA-Z0-9]+"/&gt;
  </code></pre>