Select Add next to the validation rules field again to define the second validation rule.
再次选择Validation rules字段旁的Add以定义第二条验证规则。
In the Add a variable validation rule window, select Specify an invalid value, then Next.
在Addavariablevalidation rule窗口中,选择Specifyan invalidvalue,然后单击Next。
In the Add a variable validation rule window, select Specify an invalid value and click Next.
在Addavariablevalidation rule窗口中,选择Specifyan invalidvalue并单击Next。
Each property has some restriction or validation rule attached to it. You'll assign the following rules
每个属性都有一些与之关联的限制或验证规则。
Rather than having each object maintain its own validation, you merely encode the correct validation rule for each object.
您只要为每个对象编码正确的验证规则,而不是让每个对象维护自己的验证。
Verify the validation rule results.
验证该验证规则的结果。
The following example shows how to implement a validation rule.
下面的示例演示如何实现验证规则。
Used to identify the importance of a validation rule that is run in a load test.
用来识别在负载测试中执行之验证规则的重要性。
A validation rule that is used to validate the selected option from an HTML select tag.
一个验证规则,它用于验证HTML选择标记中的选定选项的。
There is no way to override or turn off a test-level validation rule for a given request.
无法对给定的请求重写或关闭测试级验证规则。
Provides a container for a regular-expression client validation rule that is sent to the browser.
为发送到浏览器的正则表达式客户端验证规则提供容器。
In other words, adding a test-level validation rule is a shortcut for adding the same rule to every request.
换句话说,添加测试级验证规则是向每个请求添加相同规则的快捷方式。
We'll need some error messages of course, a set for each validated property, one message per validation rule.
很显然,我们需要一些错误消息,每个验证的属性都需要一套,每个验证规则需要一条消息。
To define the first validation rule, select Specify a valid value in the Add a variable validation rule window, then Next.
要定义第一条验证规则,在Addavariablevalidation rule窗口中选择Specify avalidvalue,然后单击 Next。
This isn't ideal because it forces users to do more work and forces you to write another validation rule to make sure that they did it correctly.
这种做法不是很理想,因为它要求用户做更多的工作,而且还要求必须要编写另一个验证规则来确保用户能正确输入。
For instance, I could write a validation rule asserting that a given parameter was not null and then reuse it across all methods needing the same rule.
例如,我可以写一个验证规则,用于断言指定参数不为null,然后在所有需要同样规则的方法中重用它。
For instance, I could write a validation rule asserting that a given parameter was not null and then reuse it across all methods needing the same rule.
例如,我可以写一个验证规则,用于断言指定参数不为null,然后在所有需要同样规则的方法中重用它。
应用推荐