make the error alerts work on Bootstrap 3

And still works with Bootstrap 2.

Yes, I know this is an example from the book, but I’m actually using it.
Merge pull request #3 from natesilva/patch-1

make the error alerts work on Bootstrap 3