applying css class forn error messages