Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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 ?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.