It doesn't introduce any reusable validation code.
它没有引入可重用的验证代码。
Your validation code sticks out because it doesn't look like the other code around it.
您的验证代码很醒目,是因为它看起来不像周围的其他代码。
This means you can encode the rules a lot faster than writing the validation code by hand.
这就意味着您可以给验证规则编码,速度比自己编写验证代码快得多。
You may even agree with the argument that validation code doesn't belong in the view layer.
您甚至可能同意验证代码不属于视图层的说法。
The validation code is scattered across multiple source files and is often under-documented.
与验证有关的代码通常散布在多个源文件中,文档也不甚详尽。
This guideline does not require that the validation code be in the publicly visible member.
此准则不要求验证代码在公共可见成员中。
Continue adding to the PHP code in Listing 3 by inserting some simple validation code, as in Listing 4.
通过添加一些简单的验证代码来继续增强清单3内的php代码,如清单4所示。
Although not ideal, tightly coupled validation code is quite common, particularly in older applications.
虽然不理想,但是紧密耦合的验证代码相当普遍,特别是在比较老的应用程序里。
You must have at least two controls on the form in order to TAB between them and thereby invoke the validation code.
该窗体上必须至少有两个控件,以便在它们之间切换并由此调用验证代码。
Unlike a tightly coupled approach, using dynamic proxies leaves you with validation code that is reusable and configurable.
与紧密耦合方法不同,使用动态代理给您带来了可以重用、可以配置的验证代码。
Along with each implementation class, Castor also generates a descriptor class that contains the binding and validation code.
除了每个实现类,Castor还生成描述符(descriptor)类,该类包含绑定和验证代码。
Adding validation code could assist you in catching accessibility errors more quickly, without having to examine an entire report.
添加验证代码可以帮助您更迅速地捕获可访问性错误,而不必检查整个报告。
Handling these events puts all of your validation code in a single location, rather than scattering it throughout your project.
处理这些事件时会将所有验证程序码置于单一位置,而不是将它四散于专案各处。
Or do you move all the validation code into the services tier, removing it from the domain class that should be the owner of that knowledge?
或者您可以将所有验证代码移入到服务层,然后从应当是该知识所有者的域类中删除它吗?
Basic tests should include the testing of validation code and assertions, and database operations such as Create, Read, Update and Delete (CRUD).
基本测试应该包括对检验代码和断言以及数据库操作(比如创建、读取、更新和删除,CRUD)的测试。
Specifically, we decided the best way to deal with data-format validation code was to keep it close to the client, thus keeping the processing overhead to a minimum.
特别是对于数据格式验证代码,我们认为处理它的最佳方法是使它接近客户机,这样可以使处理开销保持最少。
Notice how the validation code in the invoke method below is nearly identical to the code from Listing 3; in fact, I could use the same validator service here as I did earlier.
请注意,在下面的invoke方法中的验证代码,几乎与清单3中的代码完全一样。实际上,在这里可以使用与前面完全一样的验证器服务。
What if your database has some validation code that requires various fields to be filled before the document can be saved, and will produce all sorts of errors if you try to save before that?
如果数据库具有验证代码,这些代码要求在保存文档之前,各个字段都必须填写完整,并且如果还未填写完整就试图保存文档会产生各种错误,该怎么办?
Depending upon the number and nature of the validations required, the validation code can be complex and lengthy and its maintenance can become a significant burden as more partners are added.
根据所需验证的数量和性质,验证代码可能复杂冗长,而且在越来越多人参与其中后,维护将成为沉重负担。
This article shows you how SQLObject interacts with a database, how to use SQLObject to write database access and data-validation code, and how to use it with legacy or pre-existing databases.
本文展示了SQLObject如何与数据库交互,如何使用SQLObject编写数据库访问和数据验证代码,以及如何将它用于遗留或现有数据库。
This way you add server-side code to all client-side validation functions in order to check conditions and to show messages.
在这种方法中,您将把服务器端代码添加到所有客户端验证函数中,以检查条件并显示消息。
So validation serves as a check-sort of like compiling your code every time you make a change.
因此验证可以作为一种检查—有点像每次更改代码之后进行编译一样。
But what happens when the architecture insists that the code that performs the validation must come from a services tier?
但是,如果架构坚持执行验证的代码必须来自一个服务层,那么会发生什么呢?
This custom code can perform additional validation of data or process enforcement as required by customer implementations.
此自定义代码可以根据客户实现的需求执行数据或流程的其他验证。
With code generation, you can also build validation into the constructed classes, either automatically checking values when they are set or checking validity on demand.
用代码生成,您还可以将验证构建进所构造的类中,从而要么自动检查值(当设置好它们时),要么按照需要检查有效性。
While this approach works to decouple the interface's validation logic from its core business code, it isn't very reusable or configurable.
虽然这种方法可以把接口的验证逻辑从它的核心业务代码去耦,但是它的可重用性和可配置性不是很强。
It also integrates easily with your existing JAXP code, making the addition of schema validation a snap.
它很容易与已有的JAXP代码结合在一起,增加模式验证非常简单。
Although embedding the lists directly in the schema provided easy validation, when a code changed in the list, the schema had to be updated.
虽然将清单直接嵌入到模式中可以简化验证过程,但是当清单中一个代码发生变化时,这个模式就必须更新。
The following code shows the validation when putting an object into session attributes.
下面的代码显示了在将对象放入到会话属性时进行的验证工作。
Additionally, we've moved all our validation logic into one place, avoiding redundancy in the code.
另外,我们已将所有的验证逻辑移至一处,从而避免代码中出现冗余。
应用推荐