validate custom data to prevent submission errors

http://manage.dimagi.com/default.asp?142187