On a website i am currently working on in drupal, on one of the node edit forms, I have a validate function: like so:
$zip_code = $form_state['values']['submitted']['field_address']['postal_code'];
if(!preg_match("/^([a-ceghj-npr-tv-z]){1}[0-9]{1}[a-ceghj-npr-tv-z]{1}[0-9]{1}[a-ceghj-npr-tv-z]{1}[0-9]{1}$/i",$zip_code)) {
form_set_error('address', 'Please Enter a valid postal code');
}
and when this item does not validate on the form, it shows the error, but breaks all the styling for the form, it gets completely broken, items floated everything in the wrong places, wondering if anyone know anything about this ?