下面是创建自定义验证器的分步示例代码。
Here's the example code to create a custom validator, step by step.
我知道如何编写自定义验证器。
此属性允许指定自定义验证程序。
我需要做的就是添加自定义验证的实体。
创建自定义验证器的步骤如下,我们将一步步地分析。
The steps to create a custom validator are as follows; we'll go over them one by one.
可实现自定义验证程序以获取不同的行为。
A custom validator can be implemented to obtain a different behavior.
下面的代码示例显示了如何创建自定义验证。
The following code example shows how you can create custom validation.
自定义验证组件(它实现了Validator接口)。
Custom validation components (which implement the Validator interface).
在 faces-confix.xml文件中注册自定义验证。
Register your custom validator in the faces-confix.xml file.
所以,我决定设计自己的自定义验证器上显示选择的错误信息。
So, I decided to design my own custom validator to display error messages based on selections.
我只是不知道怎样把它们到每一个实体,这样我可以执行自定义验证。
I'm just not sure how to wire them up to the each entities so that I can perform custom validation.
我引入了动态脚本来支持HTTP测试脚本中的分支、循环和自定义验证。
I introduced dynamic scripting to allow branching, looping, and custom validation in HTTP test scripts.
而且我们还暴露出了为Springbean定义提供自定义验证规则的扩展点。
Furthermore we are exposing extension points to contribute custom validation rules for Spring bean definitions.
您现在应该熟悉在FacesContext中注册自定义验证器的代码了。
The code to register the custom validator with the FacesContext should look familiar to you by now.
在这种情况下,要么编写自定义验证器,要么在自定义转换器中添加一个特别的验证逻辑。
In this case, you would either have to write a custom validator, as well, or simply include any special validation logic in the custom converter.
总体而言,创建自定义验证器是相当直观的,并且可以使该验证在许多应用程序中重复使用。
Overall, creating custom validators is fairly straightforward and makes validation reusable across many applications.
ServiceRegistry提供允许编写自定义验证和通知代码的验证和通知接口。
The Service Registry provides validation and notification interfaces, which allows you to write custom validation and notification code.
因此,必须编写嵌入自定义验证逻辑,就像使用一个自定义Validator对象处理验证一样。
Therefore, you must write the inline custom validation logic as if it were dealing with validation in a custom Validator object.
如果您要使用自定义验证程序提供程序或第三方验证程序(该程序使用基于特性的元数据),可以从此类继承。
You can inherit from this class if you want to use a custom validator provider or a third-party validator that uses attribute-based metadata.
可扩展性和自定义验证:新开发的FTP服务器支持的可扩展性,使软件供应商编写定制提供商为FTP验证。
Extensibility and custom authentication: the new FTP server supports developer extensibility, making it possible for software vendors to write custom providers for FTP authentication.
对于标准JSF验证器不支持的数据类型,则需要建立自己的自定义验证组件,其中包括电子邮件地址和邮政编码。
You will need to build your own custom validation components for data types that aren't supported by the standard JSF validators, including E-mail addresses and zip codes.
不过,通过创建一个使用这个验证器的自定义标签,使其看上去像是一个自带的验证,可以进一步实现自定义验证器。
However, you can take the implementation of your custom validator one step further and make it look like built-in validation by creating a custom tag that utilizes the validator.
使用标准安全验证器(validator)(更适合用于可编辑数据验证),不可能检查这种情况,你需要自定义验证。
With standard security validators (more suitable for editable data validation), it's not possible to check that and you need to create custom validations.
将自定义recaptcha验证控件加入页面中。
Use the custom reCaptcha validation control on your page: Insert this in your page.
因此这个自定义标记的示例用法通过了验证。
使用本文介绍的工具和代码,您可以创建使用击键力学连续进行用户验证的自定义框架。
The tools and code described in this article allow you to create your own framework for continuous user verification using keystroke dynamics.
标识验证由自定义的代码来执行。
因此,在同时使用自定义转换和验证必须格外小心。
Therefore, you must execute caution when using custom convertors and validators together.
遗留门户已经使用自定义授权和身份验证方法部署,每个门户都有需要更新和维护的自定义代码。
Legacy portals had been deployed with custom authorization and authentication methods, each with custom code that needed to be updated and maintained.
遗留门户已经使用自定义授权和身份验证方法部署,每个门户都有需要更新和维护的自定义代码。
Legacy portals had been deployed with custom authorization and authentication methods, each with custom code that needed to be updated and maintained.
应用推荐