You example works for me dude!

See: http://jsfiddle.net/DjSVf/

If you want BS to handle showing errors, then use a control-group div to 
enclose your field(s) and label(s), and apply an appropriate class.
See: "Validation States" in 
http://twitter.github.com/bootstrap/base-css.html#forms


Cheers
GC

On Friday, 14 December 2012 04:53:29 UTC, Michael Glaz wrote:
>
> I have the following JavaScript to display a red border around input text 
> fields:
>
> $(document).ready(function(){
>   $('#new_user').submit(function(event){
>     $('.required').each(function(){
>       if(!$.trim($(this).val()))
>       {
>         $(this).addClass('emptyField');
>         event.preventDefault();
>       }
>     });
>   });
> });
>
> The CSS for emptyField is this:
> .emptyField {
>   border: 2px solid red;
> }
>
>
>
> But this doesn't display a red border when I get an error.  Anyone know 
> what I need to do to show the bootstrap text input boxes glowing red?
>
>

Reply via email to