I would like to clean Validation
packageDiv.find('[name$=Code]:input').each(function () { addFieldValidation($(this)); });
I`m using this but is not working correct:
packageDiv.find('[name$=Code]:input').data('val','false');
Have you got any idea?
I’m not a JQuery expert, but I think you’re calling that function incorrectly. According to http://api.jquery.com/jQuery.data/, you need to specify the element, the property, and the value as arguments, not just the latter two.
You should use the
attrfunction for this:packageDiv.find('[name$=Code]:input').attr('value','false');