我正在开发一个MVC asp.net网站,在那里我有几种形式的看法,每种形式都有其特定背景,因此许多人都有相同的名称,而且唯一的方式是使用这种背景。 我将点击、改变等事件与地质背景一起确定,所有事情都进行罚款。
The problem appears when the client side validation paints the red color for the required fields in my view and all of its forms applying the "field-validation-error" class. When I enter the required fields contents of the second of my forms, the "Required." validation message that gets cleared is the first one, not the specific message error of the field inside its second form context.
My code looks like: I have many controls with data annotations that use the Jquery context:
jQuery( expression, [context] )
$( #MyTextField , $( #my-form_context_1 )) ;
$( #MyTextField , $( #my-form_context_2 ));
是否有办法与JQuery公司合作,在特定情况下适用验证?