git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2806 a333f486-631f-4898-b8df-5754b55c2be0
@@ -265,7 +265,10 @@ function ValidateWithPattern(sFieldId, bMandatory, sPattern, sFormId, aForbidden
$('#'+sFieldId).removeAttr('title');
// Remove the element from the array
iFieldIdPos = oFormValidation[sFormId].indexOf(sFieldId);
- oFormValidation[sFormId].splice(iFieldIdPos, 1);
+ if (iFieldIdPos > -1)
+ {
+ oFormValidation[sFormId].splice(iFieldIdPos, 1);
+ }
}