Closed ghost closed 5 years ago
There is an issue with Inline Ajax Validation when the caller input field has square brakets in its id.
Sample HTML (input) <input type="text" class="validate[ajax[checkIban]]" maxlength="40" size="50" name="structure[iban]" value="" id="structure[iban]">
<input type="text" class="validate[ajax[checkIban]]" maxlength="40" size="50" name="structure[iban]" value="" id="structure[iban]">
Custom ajax control configuration "checkIban": { "url": "phpajax/iban.php", "alertTextOk": "* ok", "alertText": "* alert", "alertTextLoad": "* load" },
"checkIban": { "url": "phpajax/iban.php", "alertTextOk": "* ok", "alertText": "* alert", "alertTextLoad": "* load" },
The problem lies in row 1476 in 2.62 version: var errorField = $("#"+ errorFieldId).eq(0);
var errorField = $("#"+ errorFieldId).eq(0);
Library should escape special characters in errorFieldId variable, or else it won't be able to find the element. Should be something like this:
var errorField = $("#"+ errorFieldId.replace( /(:|\.|\[|\]|,)/g, "\\$1" )).eq(0);
There is an issue with Inline Ajax Validation when the caller input field has square brakets in its id.
Sample HTML (input)
<input type="text" class="validate[ajax[checkIban]]" maxlength="40" size="50" name="structure[iban]" value="" id="structure[iban]">
Custom ajax control configuration
"checkIban": { "url": "phpajax/iban.php", "alertTextOk": "* ok", "alertText": "* alert", "alertTextLoad": "* load" },
The problem lies in row 1476 in 2.62 version:
var errorField = $("#"+ errorFieldId).eq(0);
Library should escape special characters in errorFieldId variable, or else it won't be able to find the element. Should be something like this:
var errorField = $("#"+ errorFieldId.replace( /(:|\.|\[|\]|,)/g, "\\$1" )).eq(0);