Validation help

Validation help

I have created my controls dynamically on my forms. I have decided to create my own validation functions.  However, I use append to display the error message and the difficulty i`m having is that if there is still that error on the page, I ccan see the error mesage displayed twice.  The previous error message is displayed and the new error message appended.
 
How can I solve this problem?
 
Any other method to validate and display the error message?  I` m not using jquery  validation plug-In as I create my controls dynamically and the last control created may be empty and thus the  last control does not need any validation.