Lot of people do the validations server side.. but I assume from your question that you are validating client side in javascript ?
If you are doing so then how about creating a blank "div" and changing the
innerHTML with the
string value that you want using the getElementById() for that div.