CN111144075A - Automatic verification method based on dynamic combination strategy of web end form and verification rule - Google Patents

Automatic verification method based on dynamic combination strategy of web end form and verification rule Download PDF

Info

Publication number
CN111144075A
CN111144075A CN201911214353.0A CN201911214353A CN111144075A CN 111144075 A CN111144075 A CN 111144075A CN 201911214353 A CN201911214353 A CN 201911214353A CN 111144075 A CN111144075 A CN 111144075A
Authority
CN
China
Prior art keywords
page
information
item
verification
web page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911214353.0A
Other languages
Chinese (zh)
Inventor
陈旋
王冲
杨涛
张又文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Aijia Household Products Co Ltd
Original Assignee
Jiangsu Aijia Household Products Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Aijia Household Products Co Ltd filed Critical Jiangsu Aijia Household Products Co Ltd
Priority to CN201911214353.0A priority Critical patent/CN111144075A/en
Publication of CN111144075A publication Critical patent/CN111144075A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The invention relates to an automatic verification method based on a dynamic combination strategy of a web side form and a verification rule, which adopts a brand-new form arrangement and loading design, stores the information category of a page form and the corresponding form information in a server, only stores the information category corresponding to the page form in a web page code, triggers the web page to realize the request of presetting each item attribute corresponding to the page form and each form item to the server through the loading of the web page, and receives and finishes the loading of the page form, thereby effectively improving the efficiency of loading the page form in the web page and efficiently responding to the updating operation of the form; meanwhile, each form item adopts a web page local verification mode, so that the workload of the server can be reduced, and the efficiency of the data verification process is integrally improved.

Description

Automatic verification method based on dynamic combination strategy of web end form and verification rule
Technical Field
The invention relates to an automatic verification method based on a dynamic combination strategy of a web end form and a verification rule, and belongs to the technical field of data verification.
Background
In Web-based applications, forms can be a very common scenario and often take a significant amount of time to develop to handle the various complex logics. Particularly, in the business of the enterprise background, a large number of business form submission scenes exist. For example, entering commodity information at a web end, and specifying different commodity categories in a commodity form may result in corresponding changes of commodity attributes. In the prior art, a static form is usually adopted, that is, all form items in the form are fixed in advance, for example, how many form items are, what type each item is, and the check rule required by each type is mostly fixed. With the development of business, the attributes of the goods may also be changed, such as adding and deleting form items, adjusting the display position of the form items, and modifying the check rules of the form items. Thus, the front-end code needs to be continuously modified to meet the requirements. This process has the following problems: high maintenance workload, slow development, limited reusability, poor flexibility and the like.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an automatic verification method based on a dynamic combination strategy of a web end form and a verification rule, the information category of the page form and the corresponding form information are stored in a server, and the information is called by the loading action of a web page, so that the high efficiency of the application of the page form in the web page can be greatly improved.
The invention adopts the following technical scheme for solving the technical problems: the invention designs an automatic verification method based on a dynamic combination strategy of a web side form and a verification rule, which is used for realizing automatic verification aiming at information filled in a page form in a web page and is characterized in that a server is internally provided with preset information categories and form information respectively corresponding to the information categories, wherein the form information comprises a preset form list and preset item attributes respectively corresponding to each form item in the form list; only storing the information category corresponding to the page form in the web page code; the automatic verification method comprises the following steps:
step A, when the web page is loaded, the web page sends the information category corresponding to the page form of the web page to a server, and then step B is carried out;
b, the server issues the form information corresponding to the information category to a web page according to the received information category, and then the step C is carried out;
c, the web page loads each form item in the form list in the page according to the form list in the received form information, dynamically renders each form item in the page according to each item attribute corresponding to each form item in the form information, completes the loading of the page form, and then enters step D;
and D, according to the item attributes respectively corresponding to the form items, carrying out local verification on the filling information of the form items in the page form by the web page, if the verification is successful, uploading the filling information of the form items to a server, and feeding back failure information after the verification fails.
As a preferred technical scheme of the invention: the number and the category of the item attributes respectively corresponding to each form item in each form list are the same.
As a preferred technical scheme of the invention: and the item attributes respectively corresponding to each form item comprise a form control name, a form field type, form field data, a check rule whether the form field data is necessary or not and a form check rule.
As a preferred technical scheme of the invention: and D, according to the form verification rule and the dom modification event corresponding to each form item, performing local verification on the filled information in real time while filling each form item in the page form by the web page respectively.
As a preferred technical scheme of the invention: in the step D, after completing the information filling operation of each form item in the page form, the web page performs local verification on the filling information of each form item in the page form based on the trigger for the filled information submission option in the page.
As a preferred technical scheme of the invention: and D, for the list item which is not checked, marking the preset color aiming at the frame of the list item through a preset errorClass type.
As a preferred technical scheme of the invention: in the step A, when the web page is loaded, the web page sends the information category corresponding to the page form to the server through the js ajax method.
Compared with the prior art, the automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule has the following technical effects by adopting the technical scheme:
the invention designs an automatic verification method based on a dynamic combination strategy of a web end form and a verification rule, adopts a brand-new form arrangement and loading design, stores the information category of a page form and the corresponding form information in a server, only stores the information category corresponding to the page form in a web page code, triggers the web page to realize a request for presetting each item attribute corresponding to the page form and each form item to the server through the loading of the web page, and receives and finishes the loading of the page form, thereby effectively improving the efficiency of loading the page form in the web page and efficiently responding to the updating operation of the form; meanwhile, each form item adopts a web page local verification mode, so that the workload of the server can be reduced, and the efficiency of the data verification process is integrally improved.
Drawings
FIG. 1 is a schematic flow chart of an automatic verification method based on a dynamic combination strategy of a web-side form and a verification rule according to the present invention;
FIG. 2 is a schematic diagram of a web page in an embodiment of the present invention.
Detailed Description
The following description will explain embodiments of the present invention in further detail with reference to the accompanying drawings.
The invention designs an automatic verification method based on a dynamic combination strategy of a web side form and a verification rule, which is used for realizing automatic verification aiming at information filled in a page form in a web page, wherein a server is internally provided with preset information categories and form information respectively corresponding to the information categories, and the form information comprises a preset form list and preset item attributes respectively corresponding to form items in the form list; the web page code only stores the information category corresponding to the page form.
In practical application, the number and the type of the item attributes corresponding to each form item in each form list are designed to be the same, that is, a unified item attribute data model is designed for each form item, and in application, the item attribute data model can be specifically designed to include a form control name (propertylame), a form field type (formtype), form field data (propertyValueList), a required check rule (requiredFlag), and a form check rule (type), that is, any one form item corresponds to the five item attributes.
The form control name (propertylame) is used for determining the name of input data required by the form item;
a form field type (formtype) used for indicating the data type of the form field corresponding to the form item, such as input box, drop-down box select, multiple choice box, etc.;
form field data (propertyValueList), that is, data groups or object contents to be rendered in the form field corresponding to the form item, such as each data message in a drop-down box;
whether a check rule (requiredFlag) is required, namely whether the form field corresponding to the form item is a required item is represented;
the form verification rule (type) is a verification rule representing a form field corresponding to the form item.
In practical application, as shown in fig. 1, the automatic verification method includes the following steps a to D, based on the design of the server to set each information category and the form information corresponding to each information category, and the design of storing the information category corresponding to the page form in the web page code.
And step A, when the web page is loaded, the web page sends the information category corresponding to the page form of the web page to the server, and then step B is carried out.
And step B, the server issues the form information corresponding to the information category to the web page according to the received information category, and then the step C is carried out.
And C, loading each form item in the form list in the page by the web page according to the form list in the received form information, dynamically rendering each form item in the page according to each item attribute corresponding to each form item in the form information, completing the loading of the page form, and then entering the step D.
In practical application, dynamic rendering is performed on each form item in a page according to a form control name (propertylame), a form field type (formtype), form field data (propertyValueList), whether a check rule (requiredFlag) is required to be filled, and a form check rule (type) corresponding to each form item in form information.
And D, according to the item attributes respectively corresponding to the form items, carrying out local verification on the filling information of the form items in the page form by the web page, if the verification is successful, uploading the filling information of the form items to a server, and feeding back failure information after the verification fails.
In a specific practical application, two ways of checking are designed for the operation of the step D, namely local checking, one way is dynamic checking, and for each item attribute corresponding to each form item, the design further includes a dom modification event, for example, for an input box input plus a blu event, a drop box select plus a change event; in step D, according to the form verification rule (type) and the dom modification event respectively corresponding to each form item, the web page performs local verification on the filling information in real time while respectively filling each form item in the page form.
In practical applications, the design code of the dynamic verification is designed as follows:
Figure DEST_PATH_IMAGE002
alternatively, after completion of the information filling operation for each form item in the page form, the filling information for each form item in the page form is verified locally by the web page based on a trigger in the page for a filled-in information submission option, such as a "save" or "submit" button.
Based on the step D, aiming at the verification process of the page form in the web page, the invention further designs to set a preset errorClass and a preset passClass in the web page code, wherein as shown in fig. 2, aiming at the form item which is not verified in the verification process, through the preset errorClass, a preset color mark is realized for the form item frame, such as red, the check error of the form item is indicated, and an error reporting prompt message is displayed; and for the list item passing the verification, marking the list item with a success mark through a preset passClass class.
Based on the design of the errorClass and the passClass, namely, in the verification process, the verification operation of each form item is marked, each verification action can perform traversal verification on the unverified form items according to the mark, so that the repeated verification is reduced, for the form items which do not pass the verification, a user modifies the form items according to an error prompt statement until the data is reasonable, the mark which is made when the form items pass the errorClass is removed, and the form items are marked successfully through the passClass.
The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule is designed by adopting a brand-new form arrangement and loading design, the information category of the page form and the corresponding form information are stored in a server, only the information category corresponding to the page form is stored in a web page code, the web page is triggered to realize the request of presetting the item attributes corresponding to the page form and each form item to the server through the loading of the web page, and the web page receives and completes the loading of the page form, so that the efficiency of loading the page form in the web page can be effectively improved, and the updating operation of the form can be efficiently responded; meanwhile, each form item adopts a web page local verification mode, so that the workload of the server can be reduced, and the efficiency of the data verification process is integrally improved.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (7)

1. An automatic verification method based on a dynamic combination strategy of a web side form and a verification rule is used for realizing automatic verification aiming at information filled in a page form in a web page, and is characterized in that a server is internally provided with preset information categories and form information respectively corresponding to the information categories, and the form information comprises a preset form list and preset item attributes respectively corresponding to form items in the form list; only storing the information category corresponding to the page form in the web page code; the automatic verification method comprises the following steps:
step A, when the web page is loaded, the web page sends the information category corresponding to the page form of the web page to a server, and then step B is carried out;
b, the server issues the form information corresponding to the information category to a web page according to the received information category, and then the step C is carried out;
c, the web page loads each form item in the form list in the page according to the form list in the received form information, dynamically renders each form item in the page according to each item attribute corresponding to each form item in the form information, completes the loading of the page form, and then enters step D;
and D, according to the item attributes respectively corresponding to the form items, carrying out local verification on the filling information of the form items in the page form by the web page, if the verification is successful, uploading the filling information of the form items to a server, and feeding back failure information after the verification fails.
2. The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule of claim 1, wherein: in one embodiment, the number and the category of the item attributes corresponding to each form item in each form list are the same.
3. The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule of claim 2, wherein: in one embodiment, the item attributes respectively corresponding to the form items include a form control name, a form field type, form field data, a check rule that is necessary to be checked, and a form check rule.
4. The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule of claim 3, wherein: in one embodiment, each item attribute corresponding to each form item further includes a dom modification event, and in step D, according to the form verification rule and the dom modification event corresponding to each form item, the web page performs local verification on the filling information in real time while each form item in the page form is filled in, respectively.
5. The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule of claim 1, wherein: in one embodiment, in the step D, after completing the information filling operation of each form item in the page form, based on the trigger for the filled information submission option in the page, the web page performs local verification on the filled information of each form item in the page form.
6. The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule of claim 1, wherein: in an embodiment, in the step D, for the form item that does not pass the verification, a mark of a preset color is implemented for a frame of the form item through a preset errorlclass.
7. The automatic verification method based on the dynamic combination strategy of the web-side form and the verification rule of claim 1, wherein: in one embodiment, in the step a, when the web page is loaded, the web page sends the information category corresponding to the page form to the server through js' ajax method.
CN201911214353.0A 2019-12-02 2019-12-02 Automatic verification method based on dynamic combination strategy of web end form and verification rule Pending CN111144075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911214353.0A CN111144075A (en) 2019-12-02 2019-12-02 Automatic verification method based on dynamic combination strategy of web end form and verification rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911214353.0A CN111144075A (en) 2019-12-02 2019-12-02 Automatic verification method based on dynamic combination strategy of web end form and verification rule

Publications (1)

Publication Number Publication Date
CN111144075A true CN111144075A (en) 2020-05-12

Family

ID=70517435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911214353.0A Pending CN111144075A (en) 2019-12-02 2019-12-02 Automatic verification method based on dynamic combination strategy of web end form and verification rule

Country Status (1)

Country Link
CN (1) CN111144075A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377417A (en) * 2021-06-29 2021-09-10 中国平安财产保险股份有限公司 Form data checking method, device, equipment and storage medium
CN114281427A (en) * 2021-12-22 2022-04-05 上海云轴信息科技有限公司 Method and equipment for batch parameter configuration and verification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521352A (en) * 2011-12-12 2012-06-27 中国建设银行股份有限公司 Method and device for generating page
CN107766124A (en) * 2017-10-26 2018-03-06 福建星瑞格软件有限公司 A kind of automatic verification method and device of WEB lists
CN108037920A (en) * 2017-11-03 2018-05-15 福建省华渔教育科技有限公司 Client customizing form generation method, storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521352A (en) * 2011-12-12 2012-06-27 中国建设银行股份有限公司 Method and device for generating page
CN107766124A (en) * 2017-10-26 2018-03-06 福建星瑞格软件有限公司 A kind of automatic verification method and device of WEB lists
CN108037920A (en) * 2017-11-03 2018-05-15 福建省华渔教育科技有限公司 Client customizing form generation method, storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377417A (en) * 2021-06-29 2021-09-10 中国平安财产保险股份有限公司 Form data checking method, device, equipment and storage medium
CN114281427A (en) * 2021-12-22 2022-04-05 上海云轴信息科技有限公司 Method and equipment for batch parameter configuration and verification

Similar Documents

Publication Publication Date Title
US10475132B1 (en) Computer implemented methods systems and articles of manufacture for identifying tax return preparation application questions based on semantic dependency
US9916628B1 (en) Interview question modification during preparation of electronic tax return
US20130166550A1 (en) Integration of Tags and Object Data
US20120041990A1 (en) System and Method for Generating Dashboard Display in Software Applications
WO2016001765A1 (en) Systems and methods for flexible sourcing systems
KR20050013094A (en) Centralized management of packaging data with rule-based content validation
US10977746B1 (en) Computer implemented methods systems and articles of manufacture for suggestion-based interview engine for tax return preparation application
US20160012551A1 (en) Apparatus and Application Server for Providing a Service to a User
CN111144075A (en) Automatic verification method based on dynamic combination strategy of web end form and verification rule
CN107146095A (en) Exhibition information processing method, device and the mailing system of a kind of mail
CN115202639A (en) Code generation method, device, equipment and storage medium based on custom module
US10503823B2 (en) Method and apparatus providing contextual suggestion in planning spreadsheet
CN108153465A (en) Label setting method and device based on enterprise SaaS applications
CN117420986A (en) Marketing center platform system adopting gray scale heat deployment mode based on real Native
CN104268244A (en) Method and device for processing form
CN111090976A (en) Method and device for generating inspection document based on dynamic data
CN106649318A (en) Information display method and device
JP5675666B2 (en) Timed data history management system
CN112817624B (en) Real Native-based gray scale heat deployment system
US20230162517A1 (en) Interactive visual representation of semantically related extracted data
CN111858595B (en) Dynamic configuration method and system for electric power engineering examination record table
US11556523B2 (en) Calculating order dependency in configuration activation for complex scenarios
US9886435B2 (en) Pseudo internal numbering mechanism
Li Process mining based on object-centric behavioral constraint (ocbc) models
CN113656408A (en) Full-life-cycle management method and system for aviation material based on RFID combined block chain technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination