form fix.

This commit is contained in:
Qiang Xue
2013-05-02 07:40:29 -04:00
parent 86330471fe
commit 7d999b2652
2 changed files with 3 additions and 3 deletions

View File

@ -360,7 +360,7 @@
attribute.status = 1;
if ($input.length) {
hasError = messages && $.isArray(messages[attribute.id]) && messages[attribute.name].length;
hasError = messages && $.isArray(messages[attribute.name]) && messages[attribute.name].length;
var $container = $form.find(attribute.container);
$container.removeClass(
data.settings.validatingCssClass + ' ' +
@ -369,7 +369,7 @@
);
if (hasError) {
$form.find(attribute.error).html(messages[attribute.name][0]);
$container.find(attribute.error).html(messages[attribute.name][0]);
$container.addClass(data.settings.errorCssClass);
} else if (attribute.enableAjaxValidation || attribute.enableClientValidation && attribute.validate) {
$container.addClass(data.settings.successCssClass);