Hi CodeGeek,
This is exacltly what my code in example is doing
You just need to replace your showAlertMsg() by the detailReportValidation() in my example
detailReportValidation(<the id of element to be verified>,<true or false>,"<your error message>");
True will display the corresponding message and highlight the corresponding field on the form, false will just pass trough.
Your error message can be hardcoded here or be retrieve from the catalog using the msgtext() function
Hope this clarify
Give it a try and you will see..
Regards,
Jerome