Universal form verification method for js

A general-purpose table and form technology, applied in program control devices and other directions, can solve cumbersome problems, and achieve the effects of improving code sharing, simplifying front-end page development, and reducing code coupling

Inactive Publication Date: 2015-09-09
G CLOUD TECH
View PDF3 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this way, front-end form verificati

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
  • Universal form verification method for js

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] As shown in the accompanying drawings, the present invention utilizes the extended attributes of the html form elements, expands the attributes of the form elements, binds data verification rules and error prompts, and completes different form front-end data validations through shared JS functions.

[0020] Described method specifically comprises the following steps:

[0021] The first step is to add html form elements in the normal way;

[0022] The second step is to add the extended attributes checkType and mess to the form element space that needs to be verified. According to the actual data format requirements, write the verification rule identifier into the checkType attribute, and write the error prompt into the mess attribute;

[0023] The third step is to write a JS verification function and define the verification rule type;

[0024] The fourth step is to call the verification function, traverse the form element controls, judge the value in the checkType attri...

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 present invention relates to the technical field of software development, particularly to a universal form verification method for js. The method comprises: binding a format requirement rule of form elements on data and error prompts to self attribute of a control by virtue of an expansion attribute of html form elements; and then writing a universal function to traverse the html control, and verifying the control according to an inspection rule of the control and prompting undesirable input data. Therefore, the universality and flexibility of form data verification in the foreground are improved. The method is simple and easy to use, is quite helpful for reducing the workload of a foreground UI engineer and accelerating the development speed, and can be used for the development of foreground pages.

Description

technical field [0001] The invention relates to the technical field of software development, in particular to a method for realizing js universal form verification. Background technique [0002] The functions of the current WEB programs are becoming more and more complex, and there are many program pages; and each page has its own different business logic, and the data format requirements are different. At the same time, in order to improve user experience and reduce program bugs, data verification before page form submission is essential; therefore, a form usually corresponds to a form verification function. In this way, front-end form verification becomes a necessary and tedious task. Contents of the invention [0003] The technical problem to be solved by the present invention is to provide a general html form verification method and effectively improve the verification efficiency. [0004] The scheme that the present invention solves the problems of the technologies ...

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
IPC IPC(8): G06F9/44
Inventor 文新徐震宇孙傲冰季统凯
Owner G CLOUD TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products