format error message on registration form