posabsolute/jQuery-Validation-Engine — Issue #236: field ajax result not updating appropriately for fields ids that contain periods
Author: DanBadea
Created: 2012-01-09 11:08:24+00:00
State: open

In the _ajax method, at the beginning of the success handler of the ajax call you have the fallowing code:
var errorFieldId = json[0];
var errorField = $($("#" + errorFieldId)[0]);

If the ID of the filed contains any periods (or any other CSS special characters for that matter) the second line won't work. In my case, I have a field that's called "Model.Text".

I see 2 options to fix this:
1. Escape the errorFieldId before using it inside the jQuery selector.
2. Use the document.getElementyById(errorFieldId) first to get the element and then use jQuery just to extend it.

Keep up the good work on the library!

Regards,
Dan