CN110795081A - Method for realizing universal form verification - Google Patents

Method for realizing universal form verification Download PDF

Info

Publication number
CN110795081A
CN110795081A CN201911030324.9A CN201911030324A CN110795081A CN 110795081 A CN110795081 A CN 110795081A CN 201911030324 A CN201911030324 A CN 201911030324A CN 110795081 A CN110795081 A CN 110795081A
Authority
CN
China
Prior art keywords
verification
check
format
built
function
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
CN201911030324.9A
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.)
Shandong Health And Medical Big Data Co Ltd
Original Assignee
Shandong Health And Medical Big Data 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 Shandong Health And Medical Big Data Co Ltd filed Critical Shandong Health And Medical Big Data Co Ltd
Priority to CN201911030324.9A priority Critical patent/CN110795081A/en
Publication of CN110795081A publication Critical patent/CN110795081A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for realizing universal form verification, which belongs to the technical field of computer application, is internally provided with a large number of verification functions, can meet different verification requirements through the combination of built-in verification rules, can support the formulation of the verification rules of single element binding verification and the mutual limitation of a plurality of elements, and effectively meets the requirements of developers.

Description

Method for realizing universal form verification
Technical Field
The invention relates to a computer application technology, in particular to a method for realizing universal form verification, which has a large amount of built-in format verification and can be freely combined to realize a custom verification rule.
Background
The collected data are various physical quantities such as temperature, water level, wind speed, pressure, etc. which have been converted into electrical signals, and may be analog quantities or digital quantities. The acquisition is generally a sampling mode, that is, the same point data is repeatedly acquired at certain time intervals (called sampling period). The acquired data are mostly instantaneous values, but also characteristic values within a certain period of time. Accurate data measurements are the basis for data acquisition. The data measurement method includes contact and non-contact, and the detection elements are various. No matter which method and element, the data correctness is ensured on the premise of not influencing the state of the object to be measured and the measurement environment. The data collection is very broad, and comprises the collection of planar continuous physical quantities. In computer-aided drawing, mapping, designing, the process of digitizing a graphic or image may also be referred to as data acquisition, where geometric (or physical, e.g., grayscale) data is acquired.
Today, the internet industry is rapidly developing, data acquisition is widely applied to the internet and distributed fields, and the data acquisition field is changed significantly. First, intelligent data acquisition systems in distributed control applications have been under great development both at home and abroad. Secondly, the number of bus-compatible data collection cards is increasing, as are the number of data collection systems compatible with personal computers. Various data acquisition machines are published at home and abroad, and bring data acquisition into a brand new era.
With the rapid development of computer networks, a lot of data collection is often accompanied in the interaction process of users and application programs. The form is mainly responsible for data collection in the webpage. The form verification focuses on ensuring that a user submits data in a correct format, namely, input data of a form field in an HTML form is verified, for example, whether the form is necessary to be filled, whether input content is a legal mail address, whether an input format is a number and the like.
And (4) submitting and checking the form, and submitting the data only if the checking condition is met.
The form can set the form verification condition and verify data in the form attribute, and after the flow form starts the flow, the verification condition setting in the form attribute is no longer valid, and the verification condition of the node needs to be set in the flow setting-node attribute-more attribute-node verification condition.
Checking rules
(1) And (4) the condition of writing in the form verification is satisfied, the data can be submitted, and if the condition is not satisfied, the data cannot be submitted. So only the correct conditions need to be written. (2) Checking the input content in the error prompt occurs when the submission condition is not met. (3) Judging the symbol, (4) using the formula, (5) if the form starts the flow, the form verification fails, and the node verification is taken as the standard. In the flow setting-node check, the check of the node needs to be added.
Form verification is an important function in web development, and can ensure that a user submits data in a correct format and ensure that the submitted data can enable an application program to work normally. However, in actual development, the form verification method is too cumbersome.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method for realizing the verification of a universal form so as to meet different verification requirements.
The technical scheme of the invention is as follows:
a method for implementing a universal form validation,
directly binding elements needing to be checked, defining built-in attributes and methods thereof, customizing checking rules, and making form verification with different functions.
Further, in the above-mentioned case,
during verification, the form verification is directly bound on the element, and a built-in format verification method is directly introduced, wherein the self-defined format verification supports ajax and logic operation.
Further, in the above-mentioned case,
first, a CheckData attribute is added to the element that needs to be verified.
Further, in the above-mentioned case,
the check rule built in the checkData is used.
Further, in the above-mentioned case,
the verification rules include data that may define limits on whether the input content must be filled, must be a number, whether the date format is legal, the length of the input content, the mailbox format, and the comparison.
Further, in the above-mentioned case,
and calling a check function, judging the value in the checkData attribute, carrying out rule check on the form, and considering that the form data is valid for verification through the check.
Furthermore, a unified verification function is called before the form is submitted, and the form ID needing to be verified is used as a parameter and is transmitted to the function.
Further, in the above-mentioned case,
when the verification fails, the function gives a verification prompt and returns false; all form elements are verified before returning true.
The invention has the beneficial effects that:
a large number of check functions are built in, different verification requirements can be met through combination of built-in check rules, single element binding verification and establishment of verification rules with mutual limitation of multiple elements can be supported, and the requirements of developers are effectively met.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below, it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the protection scope of the present invention.
The invention provides a form verification method which has a large number of built-in format verifications and can be freely combined to realize a custom verification rule, which comprises the following steps:
when the built-in format verification is used, the form verification can be directly bound on the element, and a built-in format verification method can be directly introduced, wherein the self-defined format verification supports ajax, logic operation and the like.
When the built-in format is used for verification, a plurality of elements can be directly bound, and input data of the elements are limited and mutual verification rules are made.
The invention provides a universal form verification method, which enables a developer to directly bind elements needing to be verified, defines built-in attributes and methods thereof, customizes verification rules and works out form verification with different functions. The process of the form verification example is mainly divided into the following steps:
firstly, adding a CheckData attribute in an element to be checked;
and secondly, using a built-in check rule in checkData, wherein the check rule can define whether input content is limited to be filled, whether the input content is required to be digital or not, whether a date format is legal or not, the length of the input content, a mailbox format, compared data (which can support ajax, regular operation and the like) and the like.
And thirdly, calling a check function, judging the value in the checkData attribute, carrying out rule check on the form, and considering that the form data is valid for verification through the check.
Step four, calling a unified verification function before the form is submitted, and transmitting the ID of the form to be verified to the function as a parameter; when the verification fails, the function gives a verification prompt and returns false; all form elements are verified before returning true.
A large number of built-in check functions can meet different verification requirements through combination of built-in check rules, and single-element binding verification and establishment of verification rules for limiting multiple elements to each other can be supported.
The above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A method for implementing universal form verification,
directly binding elements needing to be checked, defining built-in attributes and methods thereof, customizing checking rules, and making form verification with different functions.
2. The method of claim 1,
during verification, the form verification is directly bound on the element, and a built-in format verification method is directly introduced, wherein the self-defined format verification supports ajax and logic operation.
3. The method of claim 2,
first, a CheckData attribute is added to the element that needs to be verified.
4. The method of claim 3,
the check rule built in the checkData is used.
5. The method of claim 4,
the verification rules include data that may define limits on whether the input content must be filled, must be a number, whether the date format is legal, the length of the input content, the mailbox format, and the comparison.
6. The method of claim 5,
and calling a check function, judging the value in the checkData attribute, carrying out rule check on the form, and considering that the form data is valid for verification through the check.
7. The method of claim 6,
and calling a unified verification function before the form is submitted, and transmitting the form ID needing to be verified to the function as a parameter.
8. The method of claim 7,
when the verification fails, the function gives a verification prompt and returns false; all form elements are verified before returning true.
CN201911030324.9A 2019-10-28 2019-10-28 Method for realizing universal form verification Pending CN110795081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911030324.9A CN110795081A (en) 2019-10-28 2019-10-28 Method for realizing universal form verification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911030324.9A CN110795081A (en) 2019-10-28 2019-10-28 Method for realizing universal form verification

Publications (1)

Publication Number Publication Date
CN110795081A true CN110795081A (en) 2020-02-14

Family

ID=69441512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911030324.9A Pending CN110795081A (en) 2019-10-28 2019-10-28 Method for realizing universal form verification

Country Status (1)

Country Link
CN (1) CN110795081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115146322A (en) * 2022-09-01 2022-10-04 杭州安恒信息技术股份有限公司 Data verification method, device and equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984547A (en) * 2014-05-14 2014-08-13 上海上讯信息技术股份有限公司 Form validation method and system
CN104899027A (en) * 2015-05-22 2015-09-09 国云科技股份有限公司 Universal form verification method for js
CN106445552A (en) * 2016-10-13 2017-02-22 浪潮(苏州)金融技术服务有限公司 Method for submitting verification of medical industry client development form

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984547A (en) * 2014-05-14 2014-08-13 上海上讯信息技术股份有限公司 Form validation method and system
CN104899027A (en) * 2015-05-22 2015-09-09 国云科技股份有限公司 Universal form verification method for js
CN106445552A (en) * 2016-10-13 2017-02-22 浪潮(苏州)金融技术服务有限公司 Method for submitting verification of medical industry client development form

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115146322A (en) * 2022-09-01 2022-10-04 杭州安恒信息技术股份有限公司 Data verification method, device and equipment and storage medium

Similar Documents

Publication Publication Date Title
Savalei On the computation of the RMSEA and CFI from the mean-and-variance corrected test statistic with nonnormal data in SEM
CN106248044B (en) A kind of bridge full-bridge Multi-point deflection real-time acquisition and display system
CN101526963A (en) Method for identifying web page coding, device and terminal equipment
CN105608007B (en) Page model, user interface automated testing method and device
US20210342122A1 (en) Electric power software development platform
CN107870989A (en) webpage generating method and terminal device
CN103428080A (en) Data unpacking and data packing method
CN109240912A (en) A kind of performance estimating method and terminal of the web application based on big data analysis
KR102226463B1 (en) UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same
US20220350857A1 (en) Methods and systems for browser extension used to generate relative xpath, absolute xpath and/or css selectors
CN106487939A (en) A kind of method and apparatus determining User IP subnet, a kind of electronic equipment
US10331442B2 (en) Visual design evaluation
CN114443577A (en) Drawing processing method, device, equipment and storage medium
CN104142975A (en) Microblog information promotion method, device and system
CN110795081A (en) Method for realizing universal form verification
CN110795464A (en) Method, device, terminal and storage medium for checking field of object marker data
CN103593344A (en) Information acquisition method and device
CN104021216A (en) Message proxy server and information publish subscription method and system
King Introduction to data acquisition with LabVIEW
CN109240664A (en) A kind of method and terminal acquiring user behavior information
CN102523286A (en) Method and device for obtaining credit degree of service
CN112000589A (en) Data writing method, data reading device and electronic equipment
CN104808913A (en) Event responding method and device
CN103885988B (en) Export method and device, the content output system of content
CN106790160A (en) Security level identification and method of calibration and device

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