Custom form validation
I assume you are using Drupal's Form API.


  
  I want to limit specific entries on the client side IE: only allowing 6 characters being entered etc.
  


In your element definition, you need to add the HTML attribute maxlength. For example:

$form['your_field_name']['#attributes'] = array('maxlength' =&gt; array('6'));  

Regarding:


  
  On submit I want to run through validation rules to make sure what was entered is correct. IE: only positive #s etc.
  


You can create your own validation function for the form or the element. For example, in your form definition, in the element you want to validate, you need to enter:

$form['your_field_name']['#element_validate'] = array('your_field_name_validate');

In this case, your_field_name_validate is the name of the function that will be invoked when the form is submitted. The function needs to be in the same module as the form definition, or in an include file. See an example here. Pasting:

function my_field_name_validate($element, &amp;$form_state, $form) {
   if (empty($element['#value'])) {
     form_error($element, t('This field is required.'));
   }
}