CN110334303A - Form validation method, device, computer equipment and storage medium - Google Patents

Form validation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110334303A
CN110334303A CN201910484958.5A CN201910484958A CN110334303A CN 110334303 A CN110334303 A CN 110334303A CN 201910484958 A CN201910484958 A CN 201910484958A CN 110334303 A CN110334303 A CN 110334303A
Authority
CN
China
Prior art keywords
list
verification
input frame
input
information
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
CN201910484958.5A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910484958.5A priority Critical patent/CN110334303A/en
Publication of CN110334303A publication Critical patent/CN110334303A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Telephonic Communication Services (AREA)

Abstract

This application involves research and development management domains, provide a kind of list verification field, provide a kind of form validation method, device, computer equipment and storage medium.The described method includes: monitoring the corresponding list of module to be verified submits event, list verification service object is pre-generated in module to be verified, the list verification service object is loaded with the verification rule of each input frame in list verification service enabling method and the corresponding list of current module to be verified;When successfully listening to list submission event, the list verification service enabling method of the list verification service object is called to service to enable list verification predetermined;The list is verified by list verification service, to judge whether the corresponding input information of the input frame in the list meets verification rule corresponding with the input frame in the list verification service object;When the corresponding input information of the input frame is unsatisfactory for its corresponding verification rule, miscue information is shown to user.

Description

Form validation method, device, computer equipment and storage medium
Technical field
This application involves Internet technical field, more particularly to a kind of form validation method, device, computer equipment and Storage medium.
Background technique
Currently, user needs to pass through in the usage scenario of the various lists such as registration microblogging, registration mailbox, trade company center The list that browser is shown submits various information to corresponding server, and list is by one or more input frames or choice box group At browser needs the information in the list submitted to user to verify, for confirming whether the information of submission meets the requirements.
In traditional technology, the verification to list is realized, the verification rule for each input frame in list is needed to compile Logic judgment code is write, when the verification rule in list is more, there can be a large amount of code judgement, cause code very superfluous It is remaining, it is readable poor.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of form validation method that can reduce code redundancy, Device, computer equipment and storage medium.
A kind of form validation method, which comprises
It monitors the corresponding list of module to be verified and submits event, list verification clothes have been pre-generated in the module to be verified Business object, the list verification service object are loaded with list verification service enabling method and the corresponding table of current module to be verified The verification rule of each input frame in list;
When successfully listening to list submission event, the list verification service of the list verification service object is called to enable Method is to enable list verification service predetermined;
The list is verified by list verification service, to judge that the input frame in the list is corresponding Whether input information meets verification rule corresponding with the input frame in the list verification service object;
When the corresponding input information of the input frame is unsatisfactory for its corresponding verification rule, miscue is shown to user Information.
It is described in one of the embodiments, that the list is verified by list verification service, with judgement The corresponding input information of input frame in the list whether meet in list verification service object with the input frame pair The verification rule answered, comprising:
When in the list there are when the first preset kind input frame, it is pre- to described first by list verification service If type input frame is preferentially verified;
When the corresponding input information of the first preset kind input frame meet its corresponding verification it is regular when, by described the The corresponding input information of one preset kind input frame is sent to server and is verified;
When the successful feedback information of the verification for receiving the server return, successively by list verification service Other input frames in the list are verified;
The method also includes:
When receiving the feedback information of verification failure of server return, stops verifying and show the feedback to user Information.
It is described in one of the embodiments, that the list is verified by list verification service, with judgement The corresponding input information of input frame in the list whether meet in list verification service object with the input frame pair The verification rule answered, comprising:
When in the list there are when the second preset kind input frame, it is pre- to described second by list verification service If type input frame is preferentially verified;
When the corresponding input information of the second preset kind input frame meet its corresponding verification it is regular when, by described the The corresponding input information of two preset kind input frames is sent to server and is verified;
When the successful feedback information of the verification for receiving the server return, by list verification service to institute The corresponding association input frame of the second preset kind input frame is stated to be verified;
The method also includes:
When receiving the feedback information of verification failure of server return, the second preset kind input frame pair is determined The association input frame verification failure answered.
It is described when the corresponding input information of any one input frame is unsatisfactory for its corresponding school in one of the embodiments, When testing rule, miscue information is shown to user, comprising:
The corresponding input information of each input frame and corresponding check results are saved;
When once again listen for list submit event when, by the corresponding input information of each input frame distinguish it is corresponding The input information of preservation is compared, and will compare unsuccessful input frame and is determined as target input frame;
The target input frame is verified by list verification service, to judge that the target input frame is corresponding Input information whether to meet its corresponding verification in list verification service object regular;
When the corresponding input information of any one target input frame is unsatisfactory for its corresponding verification rule, shown to user Miscue information;And
When the corresponding check results of any one non-targeted input frame are miscue information, the school is returned to user Test result.
In one of the embodiments, the method also includes:
It, will be described when the corresponding input information of input frame each in the list all meets corresponding verification rule List is committed to server, receives the feedback information that simultaneously display server returns.
A kind of list calibration equipment, described device include:
List submits event monitoring module, submits event for monitoring the corresponding list of module to be verified, described to be verified List verification service object is pre-generated in module, the list verification service object is loaded with list verification service enabling side The verification rule of each input frame in method and the corresponding list of current module to be verified;
List verification service enables module, for calling the list to verify when successfully listening to list submission event The list verification service enabling method of service object is to enable list verification service predetermined;
Correction verification module, for being verified by list verification service to the list, to judge in the list The corresponding input information of input frame whether meet verification corresponding with the input frame in list verification service object and advise Then;
First display module, for when the corresponding input information of the input frame be unsatisfactory for its corresponding verification it is regular when, Miscue information is shown to user.
The correction verification module is also used to when there are the inputs of the first preset kind in the list in one of the embodiments, When frame, the first preset kind input frame is preferentially verified by list verification service;When described first default It is when the corresponding input information of type input frame meets its corresponding verification rule, the first preset kind input frame is corresponding Input information is sent to server and is verified;When the successful feedback information of the verification for receiving the server return, lead to The list verification service is crossed successively to verify other input frames in the list;Described device further include: second is aobvious Show module, for stopping verification when receiving the feedback information of verification failure of server return and described in showing to user Feedback information.
The correction verification module is also used to when there are the inputs of the second preset kind in the list in one of the embodiments, When frame, the second preset kind input frame is preferentially verified by list verification service;When described second default It is when the corresponding input information of type input frame meets its corresponding verification rule, the second preset kind input frame is corresponding Input information is sent to server and is verified;When the successful feedback information of the verification for receiving the server return, lead to The list verification service is crossed to verify the corresponding association input frame of the second preset kind input frame;Described device is also It include: association input frame correction verification module, for when receiving the feedback information of verification failure of server return, described in judgement The corresponding association input frame verification failure of second preset kind input frame.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device realizes step described in form validation method in above-mentioned any embodiment when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Step described in form validation method in above-mentioned any embodiment is realized when row.
Above-mentioned form validation method, device, computer equipment and storage medium, in above-mentioned form validation method, by fixed One list verification service of justice, when carrying out list verification, it is only necessary to list, which is generated, in module to be verified verifies service object, Verifying the list verification service predetermined of object enabling by the list can be verified, since list verification service can answer With greatly reducing the redundancy of code, improve the readability of code.
Detailed description of the invention
Fig. 1 is the application scenario diagram of form validation method in one embodiment;
Fig. 2 is the flow diagram of form validation method in one embodiment;
Fig. 3 is the flow diagram of form validation method in another embodiment;
Fig. 4 is the structural block diagram of list calibration equipment in one embodiment;
Fig. 5 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Form validation method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 102 It is communicated with server 104 by network by network.Terminal 102 includes at least one module to be verified, the mould to be verified Block contains form controls, and has pre-generated list verification service object, and list verification service object is loaded with list school The verification rule of each input frame in service enabling method and the list for needing to verify is tested, the monitoring of terminal 102 acts on to be verified The list of module submits event, when successfully listening to list submission event, calls the list school in list verification service object Service enabling method is tested to enable list verification service predetermined, list is verified by list verification service, To judge whether the corresponding input information of the input frame in list meets corresponding verification rule in list verification service object, when In list the corresponding input information of each input frame all meet corresponding verification it is regular when, terminal 102 is defeated by each list Enter the corresponding input information of frame and be committed to server 104, receives the feedback information that simultaneously display server 104 returns;When any one The corresponding input information of a input frame be unsatisfactory for its corresponding verification it is regular when, terminal 102 shows miscue information to user.
Wherein, terminal 102 can be, but not limited to be various personal computers, laptop and tablet computer, server 104 can be realized with the server cluster of the either multiple server compositions of independent server.
In one embodiment, as shown in Fig. 2, providing a kind of form validation method, it is applied in Fig. 1 in this way It is illustrated for terminal, comprising the following steps:
Step S202 monitors the corresponding list of module to be verified and submits event.
Specifically, a list verification service can be defined first, define a variety of verification rule in list verification service Then and each type verifies the corresponding verification function of rule, verifies function according to the corresponding check logic of each verification rule type It is packaged to obtain.Meanwhile also encapsulated in the verification server regular adding method add () and list verification service open With method start (), wherein add () is used to for the corresponding verification rule of each input frame being added separately to list verification service In object, regular adding method add () is provided at least three attributes: the corresponding input frame mark of input frame, verification rule and Miscue information, verifying rule to include but is not limited to is regular expression, and start () method is for enabling rule verification clothes Business verifies list.In the present embodiment, the service that can verify list is injected in current module to be verified, and in current band school It tests in module and generates a list verification service object.Current module to be detected refer to include form controls the page.
Step S204 calls the list of list verification service object to verify clothes when successfully listening to list submission event Business enabling method is to enable list verification service predetermined.
Specifically, in module to be verified settable " submission " button triggers when the user clicks when the submitting button List submits event, when terminal, which successfully listens to the list, submits event, calls the table loaded in list verification service object Single verification service enabling method is to enable list verification service predetermined.
Step S206 verifies list by list verification service, to judge that the input frame in list is corresponding defeated Enter whether information meets verification rule corresponding with input frame in list verification service object.
Specifically, it is directed to different types of verification rule type in list verification service, defines different verification functions, When verifying to list, terminal can obtain the corresponding input frame mark of input frame in list first, according to input collimation mark Know and search corresponding verification rule, then the corresponding verification rule type of judgement verification rule, calls verification rule type corresponding Verification function input information corresponding to input frame verify, whether meeting its corresponding verification to judge to input information advises Then.
In one embodiment, verification rule type includes but is not limited to character types, character length, character format, when When verification rule type is that character length verifies, judge whether the input information in input frame meets verification and advise by verifying function Then corresponding character length;When verification rule is character format verification, judge that the input in input frame is believed by verifying function Whether breath meets the corresponding character format of verification rule;When verification rule is character types, pass through verification function judgement input Whether the input information in frame meets the corresponding character format of verification rule.
Step S208 is shown wrong when the corresponding input information of input frame is unsatisfactory for its corresponding verification rule to user Accidentally prompt information.
Specifically, when in list the corresponding input information of any one input frame be unsatisfactory for the input frame corresponding verification rule When then, terminal can according to the corresponding input frame identifier lookup of input frame miscue information corresponding with the input frame, to The miscue information is shown on the page of correction verification module.It is appreciated that the input frame that verification rule is different, corresponding mistake Prompt information is not identical.It, can when the phone number inputted in input frame is less than 11 digit when such as being verified to phone number It shows error message " phone number digit is incorrect ";For the input frame of non-empty verification, error message " input content can be shown Cannot be sky " etc..
In one embodiment, when input information of the terminal to input frames all in list verifies success, i.e., each The corresponding input information of input frame be all satisfied the corresponding verification of the input frame it is regular when, list is committed to server by terminal, clothes Business device can verify the input information of input frame each in list, and when verifying failure, server can be returned to terminal Miscue information;When verifying successfully, server returns to terminal and submits successful feedback information, and terminal is to the anti-of server Feedforward information is shown.
In above-mentioned form validation method, by defining a list verification service, when carrying out list verification, it is only necessary to List is generated in module to be verified and verifies service object, and object is verified by the list and enables list verification service predetermined It can be verified, since list verifies service reusable, greatly reduce the redundancy of code, improve the readability of code.
In one embodiment, as shown in figure 3, providing a kind of form validation method, comprising the following steps:
Step S302 monitors the corresponding list of module to be verified and submits event.
Wherein, list verification service object has been pre-generated in current module to be verified, list verifies service object's load There is the verification rule of each input frame in list verification service enabling method and the corresponding list of current module to be verified.
Step S304 calls the list of list verification service object to verify clothes when successfully listening to list submission event Business enabling method is to enable list verification service predetermined.
Step S306 judges with the presence or absence of the first preset kind input frame in list, if so, entering step S308.
Wherein, the first preset kind input frame refers to that the availability of the corresponding input information of input frame plays the entire form The input frame of decisive role, for example, when carrying out user's registration according to mailbox, identification card number, cell-phone number etc., if these accounts Number unavailable, the verification of that the entire form is all nonsensical, therefore, these inputs can be set as the first preset kind input frame, First the input content of the first preset kind input frame is verified, if server verification failure, then illustrate these input frames Corresponding input information is unavailable, can stop list verification service at this time, no longer verify to list, directly return to first The corresponding miscue information of preset kind input frame, only when the first preset kind input frame verifies successfully, just to entire List is verified, to save the operation resource of computer.
In one embodiment, can type identification be arranged to input frame in advance in developer, such as with 1 the first default class of mark Type input frame identifies other input frames with 0, and input frame type identification and input frame mark are established incidence relation, such terminal Can according to input frame identifier lookup its corresponding input frame type identification, and whether input frame is judged according to input frame type identification For the first preset kind input frame.
Step S308 preferentially verifies the first preset kind input frame by list verification service, with judge this Whether the corresponding input information of one preset kind input frame meets its corresponding verification rule, if satisfied, S310 is then entered step, If not satisfied, then carrying out into step S322;
The corresponding input information of first preset kind input frame is sent to server and verified by step S310;
Step S312, receive server return feedback information, according to the feedback information judge server to this first in advance If whether the verification of type input frame succeeds, if so, S314 is entered step, if it is not, then entering step S316.
Step S314 successively verifies other input frames in list by list verification service, to judge that other are defeated Enter whether the corresponding input information of frame all meets corresponding verification rule, if all meeting, enters step S318, if it exists It is unsatisfactory for the input frame of verification rule, then enters step S320.
Step S316, the feedback information for stopping the verification to list and being returned to user's display server.
Step S318, when the corresponding input information of other input frames all meets corresponding verification rule, by list It is committed to server.
Step S320 shows mistake to user when there is the input frame for being unsatisfactory for its verification rule in other input frames Prompt information.
Step S322, when the corresponding input information of the first preset kind input frame is unsatisfactory for its corresponding verification rule, Miscue information is shown to user.
It in above-described embodiment, is preferentially verified by the input frame to preset kind, computer operation money can be saved Source.
In one embodiment, list is verified by list verification service, to judge the input frame pair in list It is regular whether the input information answered meets corresponding with input frame verification in list verification service object, comprising: when depositing in list In the second preset kind input frame, the second preset kind input frame is preferentially verified by list verification service;When It is when the corresponding input information of two preset kind input frames meets its corresponding verification rule, the second preset kind input frame is corresponding Input information be sent to server and verified;When the successful feedback information of the verification for receiving server return, pass through List verification service verifies the corresponding association input frame of the second preset kind input frame;The above method further include: when connecing When receiving the feedback information of verification failure of server return, the corresponding association input frame school of the second preset kind input frame is determined Test failure.
Wherein, the second preset kind input frame refers to that input information compares the input letter of other one or more input frames The input frame having an impact is ceased, association input frame refers to the input frame directly affected by the second preset kind input frame, for example, The input content of some input frame is Bank Account Number, directly affects Bank Name and the two input frames of row address of opening an account, In, the corresponding input frame of Bank Account Number is the second preset kind input frame, Bank Name and the two input frames of row address of opening an account To be associated with input frame.
In one embodiment, can type identification be arranged to input frame in advance in developer, such as with 2 the second default classes of mark Input frame type identification is established with input frame mark and is associated with the 3 non-second preset kind input frames of mark by type input frame System, while the corresponding input frame mark of the second preset kind input frame can be associated with the corresponding input frame of input frame and identified Between establish incidence relation, such terminal can according to input frame identifier lookup its corresponding input frame type identification, and according to defeated Enter box type mark and judge whether input frame is the second preset kind input frame, and is corresponding according to the second preset kind input frame Its corresponding association input frame of input frame identifier lookup.
In the present embodiment, terminal preferentially verifies the second preset kind input frame by list verification service, if It verifies successfully, is then sent to server, so that server input information corresponding to the input frame verifies, only when connecing When receiving the successful feedback information of verification of server return, it is defeated just to continue association corresponding to the second preset kind input frame Enter frame to be verified;And when receiving the feedback information of verification failure of server return, directly determine association input frame school Failure is tested, so as to skip the verification to association input frame, avoids the waste of computer operation resource.
For example, if depositing the input frame of account in list in the bank, terminal is first by list verification service to input Bank Account Number verified, such as whether the format of Bank Account Number of verification input, length meet rule, if satisfied, by silver-colored Row account is sent to server, and server judges whether the corresponding bank of the Bank Account Number is meeting the requirements of saving in database One of bank, if so, to the successful feedback information of terminal back-checking, if it is not, then to the anti-of terminal back-checking failure Feedforward information.
It is understood that when terminal by list verification service the second preset kind input frame is preferentially verified and When check results are verification failure, the input information in the second preset kind input frame will not be sent to server by terminal, Meanwhile terminal continues to verify other input frames in list, after the completion of fully entering frame verification, verification is lost if it exists The input frame lost then shows miscue information to user.
It will also be appreciated that when existing simultaneously the first preset kind input frame and the second preset kind input frame, it is excellent First the first preset kind input frame is verified, and in the school to the first preset kind input frame for receiving server return After testing successful feedback information, just start to verify the second preset kind input frame.
In one embodiment, when the corresponding input information of any one input frame is unsatisfactory for its corresponding verification rule When, miscue information is shown to user, comprising: carries out the corresponding input information of each input frame and corresponding check results It saves;When once again listening for list submission event, the corresponding input information of each input frame is distinguished into corresponding guarantor The input information deposited is compared, and will compare unsuccessful input frame and is determined as target input frame;Pass through list verification service pair Target input frame is verified, to judge whether the corresponding input information of target input frame meets its in list verification service object Corresponding verification rule;When the corresponding input information of any one target input frame is unsatisfactory for corresponding verification rule, Xiang Yong Family shows miscue information;And when the corresponding check results of any one non-targeted input frame are miscue information, to User's back-checking result.
Specifically, when the corresponding input information of any one input frame be unsatisfactory for the corresponding verification of the input frame it is regular when, Terminal shows the corresponding miscue information of the input frame to user, at this point, user can be according to miscue in the input frame Information updated, and the corresponding button of submission form is again tapped on, therefore, when terminal can be by previous submission form Inputting the preservation corresponding with input frame mark of information, check results can be first when terminal, which once again listens for list, submits event The input information of each input frame is compared with the input information of preservation, the changed input of information is inputted with judgement Frame, and these input frames are determined as target input frame, while the list verification of list verification service object can be called again Service enabling method carries out school to target input frame to enable list verification service predetermined, by list verification service It tests, to judge to input whether the corresponding input information of these target input frames that information changes meets its corresponding verification rule Then, when the corresponding input information of any one target input frame is unsatisfactory for corresponding verification rule, show that mistake mentions to user Show information.
In some cases, user may for some reason, such as when need update input information input frame compared with It misses some input frames more, the content of these input frames is not updated, it is therefore desirable to not have to input information The corresponding check results saved of the non-targeted input frame of the input frame of change are inquired, when any one non-targeted input When the corresponding check results of frame are miscue information, the check results are returned to user.
In the present embodiment, by being saved to check results, when once again listening for list submission event, it is only necessary to right The input frame that input information changes is verified, and so as to save checking time, is improved terminal and is imitated to the verification of list Rate.
It should be understood that although each step in the flow chart of Fig. 2-3 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-3 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 4, providing a kind of list calibration equipment 400, comprising:
List submits event monitoring module 402, submits event, mould to be verified for monitoring the corresponding list of module to be verified List verification service object is pre-generated in block, list verification service object is loaded with list verification service enabling method and works as The verification rule of each input frame in the corresponding list of preceding module to be verified;
List verification service enables module 404, for calling list verification clothes when successfully listening to list submission event The list verification service enabling method of business object is to enable list verification service predetermined;
Correction verification module 406, for being verified by list verification service to list, to judge the input frame pair in list Whether the input information answered meets verification rule corresponding with input frame in list verification service object;
First display module 408, for when the corresponding input information of input frame be unsatisfactory for its corresponding verification it is regular when, to User shows miscue information.
In one of the embodiments, correction verification module 406 be also used to when in list there are when the first preset kind input frame, The first preset kind input frame is preferentially verified by list verification service;When the first preset kind input frame is corresponding defeated Enter information meet its corresponding verification it is regular when, by the corresponding input information of the first preset kind input frame be sent to server into Row verification;When the successful feedback information of the verification for receiving server return, by list verification service successively in list Other input frames verified;Above-mentioned apparatus further include: the second display module, for when the verification for receiving server return When the feedback information of failure, stops verification and show feedback information to user.
In one of the embodiments, correction verification module 406 be also used to when in list there are when the second preset kind input frame, The second preset kind input frame is preferentially verified by list verification service;When the second preset kind input frame is corresponding defeated Enter information meet its corresponding verification it is regular when, by the corresponding input information of the second preset kind input frame be sent to server into Row verification;When the successful feedback information of the verification for receiving server return, by list verification service to the second default class The corresponding association input frame of type input frame is verified;Device further include: association input frame correction verification module receives clothes for working as When the feedback information for the verification failure that business device returns, determines that the corresponding association input frame of the second preset kind input frame verifies and lose It loses.
In one embodiment, the first display module 408 is also used to the corresponding input information of each input frame and correspondence Check results saved;When once again listening for list submission event, the corresponding input information of each input frame is distinguished The corresponding input information saved is compared, and will compare unsuccessful input frame and is determined as target input frame;Pass through List verification service verifies target input frame, to judge whether the corresponding input information of target input frame meets list school Test the corresponding verification rule of its in service object;When to be unsatisfactory for its corresponding for the corresponding input information of any one target input frame When verification rule, miscue information is shown to user;And when the corresponding check results of any one non-targeted input frame are mistake Accidentally when prompt information, to user's back-checking result.
In one embodiment, above-mentioned apparatus further include: list submits module, for corresponding to when input frame each in list Input information all meet corresponding verification it is regular when, list is committed to server, receives and display server returns Feedback information.
Specific about list calibration equipment limits the restriction that may refer to above for form validation method, herein not It repeats again.Modules in above-mentioned list calibration equipment can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 5.The computer equipment includes processor, the memory, network interface, display connected by system bus Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with Realize a kind of form validation method.The display screen of the computer equipment can be liquid crystal display or electric ink display screen, The input unit of the computer equipment can be the touch layer covered on display screen, be also possible to be arranged on computer equipment shell Key, trace ball or Trackpad, can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 5, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with Computer program, the processor realize the step of form validation method described in above-mentioned any embodiment when executing computer program Suddenly.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program realizes the step of form validation method described in above-mentioned any embodiment when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of form validation method, which comprises
It monitors the corresponding list of module to be verified and submits event, list verification service pair has been pre-generated in the module to be verified As the list verification service object is loaded in list verification service enabling method and the corresponding list of current module to be verified The verification rule of each input frame;
When successfully listening to list submission event, the list verification service enabling method of the list verification service object is called To enable list verification service predetermined;
The list is verified by list verification service, to judge the corresponding input of input frame in the list Whether information meets verification rule corresponding with the input frame in the list verification service object;
When the corresponding input information of the input frame is unsatisfactory for its corresponding verification rule, miscue letter is shown to user Breath.
2. the method according to claim 1, wherein it is described by the list verification service to the list into Row verification, with judge the corresponding input information of the input frame in the list whether meet in list verification service object and The corresponding verification rule of the input frame, comprising:
When in the list there are when the first preset kind input frame, by list verification service to the described first default class Type input frame is preferentially verified;
It is pre- by described first when the corresponding input information of the first preset kind input frame meets its corresponding verification rule If the corresponding input information of type input frame is sent to server and is verified;
When the successful feedback information of the verification for receiving the server return, by list verification service successively to institute Other input frames stated in list are verified;
The method also includes:
When receiving the feedback information of verification failure of server return, stops verifying and show the feedback letter to user Breath.
3. the method according to claim 1, wherein it is described by the list verification service to the list into Row verification, with judge the corresponding input information of the input frame in the list whether meet in list verification service object and The corresponding verification rule of the input frame, comprising:
When in the list there are when the second preset kind input frame, by list verification service to the described second default class Type input frame is preferentially verified;
It is pre- by described second when the corresponding input information of the second preset kind input frame meets its corresponding verification rule If the corresponding input information of type input frame is sent to server and is verified;
When receiving the successful feedback information of verification that the server returns, by list verification service to described the The corresponding association input frame of two preset kind input frames is verified;
The method also includes:
When receiving the feedback information of verification failure of server return, determine that the second preset kind input frame is corresponding It is associated with input frame verification failure.
4. the method according to claim 1, wherein described work as the corresponding input information of any one input frame not When meeting its corresponding verification rule, miscue information is shown to user, comprising:
The corresponding input information of each input frame and corresponding check results are saved;
When once again listening for list submission event, the corresponding input information of each input frame is distinguished into corresponding preservation Input information be compared, unsuccessful input frame will be compared and be determined as target input frame;
The target input frame is verified by list verification service, to judge that the target input frame is corresponding defeated Enter whether information meets the corresponding verification rule of its in the list verification service object;
When the corresponding input information of any one target input frame is unsatisfactory for its corresponding verification rule, mistake is shown to user Prompt information;And
When the corresponding check results of any one non-targeted input frame are miscue information, the verification is returned to user and is tied Fruit.
5. the method according to claim 1, which is characterized in that the method also includes:
When the corresponding input information of input frame each in the list all meets corresponding verification rule, by the list It is committed to server, receives the feedback information that simultaneously display server returns.
6. a kind of list calibration equipment, which is characterized in that described device includes:
List submits event monitoring module, submits event, the module to be verified for monitoring the corresponding list of module to be verified In pre-generated list verification service object, list verification service object be loaded with list verification service enabling method and Currently the verification of each input frame is regular in the corresponding list of module to be verified;
List verification service enables module, for calling the list verification service when successfully listening to list submission event The list verification service enabling method of object is to enable list verification service predetermined;
Correction verification module, it is defeated in the list to judge for being verified by list verification service to the list Enter whether the corresponding input information of frame meets verification rule corresponding with the input frame in the list verification service object;
First display module, for when the corresponding input information of the input frame be unsatisfactory for its corresponding verification it is regular when, Xiang Yong Family shows miscue information.
7. device according to claim 6, which is characterized in that the correction verification module is also used in the list that there are the When one preset kind input frame, the first preset kind input frame is preferentially verified by list verification service; When the corresponding input information of the first preset kind input frame meets its corresponding verification rule, by the described first default class The corresponding input information of type input frame is sent to server and is verified;When receiving, the verification that the server returns is successful When feedback information, successively other input frames in the list are verified by list verification service;Described device Further include: the second display module, for when receive server return verification failure feedback information when, stop verification and to User shows the feedback information.
8. device according to claim 6, which is characterized in that the correction verification module is also used in the list that there are the When two preset kind input frames, the second preset kind input frame is preferentially verified by list verification service; When the corresponding input information of the second preset kind input frame meets its corresponding verification rule, by the described second default class The corresponding input information of type input frame is sent to server and is verified;When receiving, the verification that the server returns is successful When feedback information, school is carried out to the corresponding association input frame of the second preset kind input frame by list verification service It tests;Described device further include: association input frame correction verification module, for the feedback letter when the verification failure for receiving server return When breath, the corresponding association input frame verification failure of the second preset kind input frame is determined.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 5 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 5 is realized when being executed by processor.
CN201910484958.5A 2019-06-05 2019-06-05 Form validation method, device, computer equipment and storage medium Pending CN110334303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910484958.5A CN110334303A (en) 2019-06-05 2019-06-05 Form validation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910484958.5A CN110334303A (en) 2019-06-05 2019-06-05 Form validation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110334303A true CN110334303A (en) 2019-10-15

Family

ID=68140243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910484958.5A Pending CN110334303A (en) 2019-06-05 2019-06-05 Form validation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110334303A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161889A (en) * 2019-12-26 2020-05-15 嘉兴太美医疗科技有限公司 Generation method and verification method of verification rule of drug safety data
CN111857883A (en) * 2020-07-23 2020-10-30 平安普惠企业管理有限公司 Page data checking method and device, electronic equipment and storage medium
CN112800751A (en) * 2021-02-19 2021-05-14 上海中通吉网络技术有限公司 Method, device, equipment and storage medium for configuring and checking mobile terminal webpage form
CN114118035A (en) * 2021-11-24 2022-03-01 深圳市北科瑞声科技股份有限公司 Form abnormal data identification method and device, electronic equipment and storage medium
CN115146322A (en) * 2022-09-01 2022-10-04 杭州安恒信息技术股份有限公司 Data verification method, device and equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106186A (en) * 2013-01-22 2013-05-15 百度在线网络技术(北京)有限公司 Form verification method and form verification system
CN105404620A (en) * 2015-11-20 2016-03-16 华为技术有限公司 Form verification method and apparatus
CN106990952A (en) * 2017-02-28 2017-07-28 福建天泉教育科技有限公司 Form validation method and its system based on Vue.js
CN109376341A (en) * 2018-09-26 2019-02-22 海南新软软件有限公司 A kind of preservation of long list and method of calibration, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106186A (en) * 2013-01-22 2013-05-15 百度在线网络技术(北京)有限公司 Form verification method and form verification system
CN105404620A (en) * 2015-11-20 2016-03-16 华为技术有限公司 Form verification method and apparatus
CN106990952A (en) * 2017-02-28 2017-07-28 福建天泉教育科技有限公司 Form validation method and its system based on Vue.js
CN109376341A (en) * 2018-09-26 2019-02-22 海南新软软件有限公司 A kind of preservation of long list and method of calibration, apparatus and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161889A (en) * 2019-12-26 2020-05-15 嘉兴太美医疗科技有限公司 Generation method and verification method of verification rule of drug safety data
CN111857883A (en) * 2020-07-23 2020-10-30 平安普惠企业管理有限公司 Page data checking method and device, electronic equipment and storage medium
CN112800751A (en) * 2021-02-19 2021-05-14 上海中通吉网络技术有限公司 Method, device, equipment and storage medium for configuring and checking mobile terminal webpage form
CN114118035A (en) * 2021-11-24 2022-03-01 深圳市北科瑞声科技股份有限公司 Form abnormal data identification method and device, electronic equipment and storage medium
CN115146322A (en) * 2022-09-01 2022-10-04 杭州安恒信息技术股份有限公司 Data verification method, device and equipment and storage medium
CN115146322B (en) * 2022-09-01 2022-11-22 杭州安恒信息技术股份有限公司 Data verification method, device and equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110334303A (en) Form validation method, device, computer equipment and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN110782240B (en) Business data processing method and device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN109033772B (en) Verification information input method and device
CN110210732A (en) Resource transfers method, apparatus, computer equipment and storage medium
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN112905459B (en) Service interface testing method and device, electronic equipment and storage medium
CN109783558A (en) Introduction method, device, computer equipment and the storage medium of Excel data
CN109039751A (en) Configure method, apparatus, computer equipment and the storage medium of routing
CN109766072A (en) Information checking input method, device, computer equipment and storage medium
CN110309099A (en) Interface managerial method, device, equipment and computer readable storage medium
CN112711640A (en) Method and device for configuring business handling process
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN109376510A (en) Front-end information verification method, device, storage medium and computer equipment
CN114443039A (en) Input parameter verification method and device, electronic equipment and storage medium
CN112579453A (en) Task testing method, device, equipment and storage medium
CN115934129A (en) Software project updating method and device, computer equipment and storage medium
CN108632348B (en) Service checking method and device
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN110737426B (en) Program block creating method, program block creating device, computer equipment and storage medium
CN110222290B (en) Page generation method and device, computer equipment and storage medium
CN109634865B (en) Code transfer testing method and device and transfer testing terminal
CN112434505A (en) Template generation method and device, computer equipment and storage medium
CN116611419B (en) Automatic contract generation method, system, financial terminal and storage medium

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