English 中文(简体)
在MVC Validation触发点时对OM做了哪些改动?
原标题:What changes to DOM are made when MVC Validation triggers?

I have a form in a modal window that is currently performing some validation. (I am using ASP.NET MVC, JQuery UI, ajax forms, data annotations and unobtrusive is active)

当这一验证触发点时 我迄今已注意到,它做了一些事情:

1. 我的确认摘要从 validation-summary-valid改为

2. 我的无效投入加上了一个称为的类别。

3) 我的验证电文从<条码>改为<条码>。

但还有其他一些事情要做,我必须说明它是如何追踪这种情况的。

在启动验证工作之前,我需要一个文本箱,然后选择另一个箱子,验证将保持沉默。

但是,一旦点击提交空文箱即可启动验证工作,即可以选择文本箱和类型,立即撤销验证,但如果这样做无效并选择一个不同的箱子,则这一错误在不重新提交的情况下重新应用。

因此,我的问题是:发生了什么变化,我知道我已经试图提交吗?

问题回答

当被称作验证时,它为每个投入/选择增加了一个类别,这些内容应加以验证。 如果投入/选择无效,则在投入/选择中增加一个类别:

class="input-validation-error"

它补充指出:

class="valid"

www.un.org/Depts/DGACM/index_spanish.htm 只有在你改变价值时,而不是失去重点时,才会对控制造成火灾。

甚至在你提交表格之前,对变化的灭火。 采用必要的文本箱,增加其价值,并贴出......然后回头,删除这一价值。 你们应当看到文本箱强调红色。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.