Prevent the JS validation (on focus) to create multiple entries for the same field, since it breaks the validation.

SVN:trunk[3421]
This commit is contained in:
Denis Flaven
2014-11-18 15:31:51 +00:00
parent 291f05683c
commit 9ca051d9d0

View File

@@ -266,7 +266,11 @@ function ValidateWithPattern(sFieldId, bMandatory, sPattern, sFormId, aForbidden
if (!bValid)
{
$('#v_'+sFieldId).addClass('ui-state-error');
oFormValidation[sFormId].push(sFieldId);
iFieldIdPos = jQuery.inArray(sFieldId, oFormValidation[sFormId]);
if (iFieldPos == -1)
{
oFormValidation[sFormId].push(sFieldId);
}
if (sMessage)
{
$('#'+sFieldId).attr('title', sMessage).tooltip();