这确保验证器生成的错误消息正确地显示在表单中。
This ensures that error messages generated by the validator are correctly displayed in the form.
要使用定制验证器,必须将其添加到表单,并为它传递需要被验证的那些字段元素,如清单14 所示。
To use a custom validator you must add it to the form, passing it field elements on which the validation needs to be applied, as shown in Listing 14.
当JSF验证器发现一个错误时,将向用户返回此表单,以便改正。
When a JSF validator finds an error, the form is returned to the user so he or she can correct it.
为了演示创建定制验证器的流程,请考虑CreateInput表单,其中每个销售者都要求输入其汽车的最低和最高价格。
To illustrate the process of creating a custom validator, consider that in the CreateInput form, each seller is asked to enter a minimum and maximum expected price for his or her vehicle.
所以,我不希望只是为了验证一个单个字段要在服务器间往返通信整个表单,或者每次都需要将数千个机场的IATA编码下载到客户端。
So I don't want to round-trip the entire form to server just to validate a single field, or download the thousands of possible airport IATA codes to the client each time.
定制验证器需要在表单实例化的时候添加到此表单。
Custom validators need to be added to the form at the time of form instantiation.
最后,您学习了如何处理表单数据,提供基于表单输入的服务器端验证。
Finally, you learned how to handle form data, providing server-side validation based on form input.
清单7停止默认动作执行(阻止表单提交到服务器),然后验证是否选择了搜索引擎。
Listing 7 stops the default action from running (it prevents the form from submitting to the server) and then validates that a search engine has been selected.
验证结构允许浏览器在提交表单前做更多的检查。
Validation constructs to allow the browser to do more checking before the form is submitted.
动态功能从具有动态计算、验证及其他特性的交互式、可编辑的表单,到服务器生成的、机器填充的表单等各不相同。
Dynamic interactions. The dynamic features vary from interactive, human edited forms with dynamic calculations, validations, and other events to server-generated, machine-filled forms.
服务器字段验证器 —向HTML表单字段添加服务器端验证。
Server field validator—adds server-side validation to HTML form fields.
在任何web应用程序中,您即可以在客户端也可以在服务器端验证表单字段。
You can validate the form fields at both the client side and server side as in any Web application.
这些技术覆盖较大的范围,从简单的分页和数据库记录排序,再到复杂的通过Web表单支持文件上传和编写定制输入验证器。
These range from the pedestrian, such as paging and sorting database records, to the more complex, such as supporting file uploads through Web forms and writing custom input validators.
表单值的服务器端验证使用类似的方式执行到任何其他web应用程序。
Server-side validation of the form values is performed in a similar fashion to any other Web application.
Tapestry和Wicket都能够对表单输入字段执行服务器端或客户机端(使用DHTML)的验证。
Tapestry and Wicket are both able to perform server-side or client-side (using DHTML) validation on form input fields.
BLL包括向支持Ajax的控件提供数据的值提供程序,以及为HTML表单数据提供服务器验证的服务器端验证程序。
The BLL consists of value providers that provide data to the Ajax-enabled controls, and server-side validators that provide server validation for HTML form data.
初始化之后,可以使用LotusFormsAPI检索表单字段,以便在服务器端验证或者进行其他处理。
After it is initiated, the Lotus Forms API can be used to retrieve form fields for validation at the server side or for any other processing.
例如,您可以在浏览器(而不是服务器)的Web表单上执行字段验证。
For example, you can perform field validation on a Web form at the browser rather than on the server.
对于服务器端验证而言,在表单提交后,Wicket就会遍历置于表单内的所有的表单组件并对组件输入执行所有的关联验证器。
In the case of server-side validation, after the form is submitted, Wicket goes through all the form components placed within the form and executes any attached validators on component input.
最后,将表单元素添加到form对象中,并且对单个表单元素应用表单元素验证器和过滤器。
Then, form elements are added to the form object, and form element validators and filters are applied to the individual form elements.
execute()方法遍历验证器列表,调用每个验证器的 execute() 方法,这些验证器的属性与给定表单的名称和可选元素的名称相匹配。
The execute() method iterates over the list of validators, invoking the execute() method of each validator whose properties match the given form name and the optional element name.
表单验证不仅将用户名写入Cookie,它还写入信息验证码(一种来自Cookie和只有服务器知道的密值的散列形式)。
Forms authentication not only writes the user's name into the cookie, it adds a message authentication code (a hash formed from the cookie and a secret value that only the Web server knows).
查看一下清单3中的Web表单,您将很快意识到该表单需要几个不同的输入验证器。
Look at the Web form in Listing 3, and you'll quickly realize that this form requires a number of different validators for its input.
这将为表单验证Cookie添加"Secure"属性,它意味着浏览器仅通过一个安全通道发送Cookie到服务器。
This adds the "Secure" attribute to the forms authentication cookie, which indicates that the browser should only send the cookie back to the server over a secure channel.
当在伺服器上验证表单时,验证错误可以显示在控制项旁边。
When the form is validated on the server, validation errors can be displayed next to the controls.
这些测试是考量你的浏览器在典型文本操作中的表现,主要包括在聊天中运用脏话过滤器,浏览器检测和表单验证。
These tests measure your browser's performance in typical text manipulations such as using a profanity filter for chats, browser detection and form validation.
在第八章中,你会掌握客户端验证的微妙之处,设计一个自适应的表单布局,并实现交互式的客户端-服务器端的表单特性,例如自动完成功能。
In Chapter 8, you'll master the finer points of client-side validation, design an adaptive form layout, and implement interactive client-server form features such as auto-completion...
表单验证票证可为浏览器所提出的下一个要求提供表单验证资讯。
The forms-authentication ticket supplies forms-authentication information to the next request made by the browser.
表单验证票证可为浏览器所提出的下一个要求提供表单验证资讯。
The forms-authentication ticket supplies forms-authentication information to the next request made by the browser.
应用推荐