fix to javascript error when validating form fields - SYSMO-1634