Unlock instant, AI-driven research and patent intelligence for your innovation.

form validation method

A verification method and form verification technology, applied in the field of form verification, can solve problems such as code changes and achieve the effect of reducing verification codes

Active Publication Date: 2017-06-16
重庆云流未来科技有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Moreover, when the plug-in function cannot meet the needs, whether it is modifying the plug-in itself or switching to other plug-ins, it will bring about very large code changes

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • form validation method
  • form validation method
  • form validation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] Embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0030] refer to figure 1 , the form verification method of the embodiment of the present invention may include the following steps:

[0031] Step 101, when the document structure loading completion (DOM Ready) event of the page is detected, all forms in the page are obtained, and when the newly added form creation completion (creationComplete) event is detected in the page, the newly added form in the page is obtained ;

[0032] Step 102, for the obtained form, if the form has an onsubmit attribute set, store the onsubmit attribute in a variable, create an anonymous function, set the anonymous function to the onsubmit attribute of the form, and make the onsubmit attribute of the form When triggered, execute the method defined by the anonymous function;

[0033] Wherein, the method defined by the anonymous function is:

[0034] Validate the form;

...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a form verification method, which belongs to the field of Internet applications. The method includes: when detecting the document structure loading completion event of the page, obtaining all forms in the page, and detecting the newly added form creation completion event in the page, obtaining the newly added form in the page; for the obtained form, If the form has the onsubmit attribute set, store the onsubmit attribute in a variable, create an anonymous function, and set the anonymous function to the onsubmit attribute of the form, so that when the onsubmit attribute of the form is triggered, the anonymous function definition will be executed method. The present invention can reduce the verification coding directly aimed at a single form or control.

Description

technical field [0001] The invention relates to the field of Internet applications, in particular to a form verification method. Background technique [0002] In web development, form validation has always been a very tedious task. Whether you develop the verification function yourself or use an open source verification plug-in, you need to write a dedicated verification code for a single control or form in the program. In a system that uses forms extensively, developers need to spend a lot of time and energy writing and maintaining these verification codes, which is not conducive to improving the quality of project coding. [0003] When performing form validation processing, you can choose to use third-party form validation plug-ins, but most plug-ins need to use their proprietary methods to configure the function of the validator through javascript code (including error handling and display methods) , and a method to submit the form, etc.). If the function of the plug-i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
Inventor 吴尚智
Owner 重庆云流未来科技有限公司