CN109324841B - Method and device for improving form verification Validform - Google Patents

Method and device for improving form verification Validform Download PDF

Info

Publication number
CN109324841B
CN109324841B CN201811174476.1A CN201811174476A CN109324841B CN 109324841 B CN109324841 B CN 109324841B CN 201811174476 A CN201811174476 A CN 201811174476A CN 109324841 B CN109324841 B CN 109324841B
Authority
CN
China
Prior art keywords
validform
display control
verification
control parameter
value
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.)
Active
Application number
CN201811174476.1A
Other languages
Chinese (zh)
Other versions
CN109324841A (en
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811174476.1A priority Critical patent/CN109324841B/en
Publication of CN109324841A publication Critical patent/CN109324841A/en
Application granted granted Critical
Publication of CN109324841B publication Critical patent/CN109324841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method and a device for improving form verification Validform, wherein the method comprises the following steps: in the process of executing the form verification Validform, detecting a display control parameter in the Validform configuration item; and determining whether to display the message prompt with successful verification according to the value of the display control parameter. According to the method and the device provided by the application, corresponding judgment on each form element is not needed when each form is verified, and only the value of the display control parameter is needed to be judged, so that the message prompt with successful verification or the disappearing prompt without successful verification can be determined to be displayed, and the development process of the application program can be simplified.

Description

Method and device for improving form verification Validform
Technical Field
The present invention relates to a form verification Validform technology, and more particularly, to a method and apparatus for improving form verification Validform.
Background
Form verification Validform is one of the high level options in Javascript. Validform can be used to validate the input data in the HTML form before the data is sent to the server, to relieve the background data transfer pressure and improve the quality and efficiency of data transfer. And binding verification is carried out on each element by virtue of Validform, and when the form is submitted or verified, a number matching icon is displayed and correctly prompted characters are displayed after the verification is passed. Therefore, after selecting the verification prompt message, Validform prompts the message whether verification succeeded or failed. And some form application scenes do not need to show that the form verification is successful, and only need to show error information. If the prompt information which is verified correctly needs to be removed, the source code or the DOM structure needs to be read, then the prompt information which is verified correctly is controlled not to be displayed through JS according to the DOM structure, repeated content is set on each form element, and the development efficiency of the application program is influenced.
Disclosure of Invention
In order to solve the foregoing technical problem, embodiments of the present invention provide a method and an apparatus for improving form verification Validform, which may determine whether to display a message prompt indicating that verification is successful according to a value of a display control parameter.
In order to achieve the object of the present invention, an embodiment of the present invention provides a method for improving form verification Validform, including:
in the process of executing the form verification Validform, detecting a display control parameter in the Validform configuration item;
and determining whether to display the message prompt with successful verification according to the value of the display control parameter.
Compared with the prior art, in the method for improving Validform provided by the embodiment of the application, in the process of executing form verification Validform, the display control parameter in the Validform configuration item is detected, and whether the message prompt of successful verification is displayed or not is determined according to the value of the display control parameter. By the method, corresponding judgment on each form element is not needed during verification of each form, and only the value of the display control parameter is needed to be judged, so that the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, and the development process of the application program can be simplified.
Optionally, the display control parameter is added to a configuration item of Validform when validating the Validform in the instantiation form.
Optionally, the determining whether to display the message prompt with successful verification according to the value of the display control parameter includes:
when the value of the display control parameter is a first preset value, displaying a message prompt of successful verification; or
And when the value of the display control parameter is a second preset value, not displaying a message prompt of successful verification.
Optionally, the first preset value is true or 1, and the second preset value is false or 0.
Optionally, the display control parameter is showSuc, and is added to an Option of Validform when validating the Validform in an instantiation form;
when the value of showSuc is set to True, indicating that a message prompt with successful verification is displayed;
and when the value of showSuc is set to False, indicating that the message prompt with successful verification is not displayed.
According to the method for improving the Validform, provided by the embodiment of the application, in the process of executing the form verification Validform, the display control parameter in the Validform configuration item is detected, and whether the message prompt of successful verification is displayed or not is determined according to the value of the display control parameter. If the display control parameter exists and the value is the successful verification display, displaying a message prompt of successful verification; and if the value of the display control parameter is that the verification is successful and the display is not carried out, not displaying the message prompt of the successful verification. By the method, corresponding judgment on each form element is not needed during verification of each form, and only the value of the display control parameter is needed to be judged, so that the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, and the development process of the application program can be simplified.
In order to solve the above problem, an embodiment of the present application further provides an apparatus for improving form verification Validform, including:
the detection module is used for detecting the display control parameters in the configuration items in the process of executing the form verification Validform;
and the judging module is used for determining whether to display the message prompt of successful verification according to the value of the display control parameter.
Further, the apparatus further comprises:
and the setting module is used for adding the display control parameters into the configuration items of the Validform when the Validform is instantiated for verification.
Optionally, the determining whether to display the message prompt with successful verification according to the value of the display control parameter includes:
when the value of the display control parameter is a first preset value, displaying a message prompt of successful verification; or
And when the value of the display control parameter is a second preset value, not displaying a message prompt of successful verification.
Optionally, the first preset value is true or 1, and the second preset value is false or 0.
Optionally, the setting module is specifically configured to add the display control parameter showSuc to an Option of the Validform when the Validform is instantiated for verifying the Validform;
when the value of showSuc is set to True, indicating that message prompt of successful verification is displayed;
and when the showSuc value is set to False, indicating that the message prompt with successful verification is not displayed.
According to the device for improving the Validform, provided by the embodiment of the application, in the process of executing the form verification Validform, the display control parameter in the Validform configuration item is detected, and whether the message prompt of successful verification is displayed or not is determined according to the value of the display control parameter. If the display control parameter exists and the value is the successful verification display, displaying a message prompt of successful verification; and if the value of the display control parameter is that the verification is successful and the display is not carried out, not displaying the message prompt of the successful verification. By the method, corresponding judgment on each form element is not needed during verification of each form, and only the value of the display control parameter is needed to be judged, so that the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, and the development process of the application program can be simplified.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flowchart of a method for improving Validform according to an embodiment of the present disclosure;
fig. 2 is a diagram illustrating an apparatus for improving Validform according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
As shown in fig. 1, an embodiment of the present application provides a method for improving form verification Validform, including:
step S10: in the process of executing the form verification Validform, detecting a display control parameter in the Validform configuration item;
step S12: and determining whether to display the message prompt with successful verification according to the value of the display control parameter.
According to the method for improving the Validform, provided by the embodiment of the application, in the process of executing the form verification Validform, the display control parameter in the Validform configuration item is detected, and whether the message prompt of successful verification is displayed or not is determined according to the value of the display control parameter. For example, if the display control parameter exists and the value of the display control parameter is successfully verified and displayed, displaying a message prompt indicating that the verification is successful; and if the display control parameter is that the verification is successful and the display is not carried out, not displaying the message prompt of the successful verification. By the method, corresponding judgment on each form element is not needed during verification of each form, and only the value of the display control parameter is needed to be judged, so that the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, and the development process of the application program can be simplified.
Optionally, before step S10, step S08 may be included: when the Validform is instantiated, the display control parameters are added into the configuration items of the Validform.
For example, when instantiating a form validation Validform, a display control parameter, e.g., showSuc, may be added to the Validform's configuration item.
Further, the determining whether to display the message prompt with successful verification according to the value of the display control parameter includes:
when the value of the display control parameter is a first preset value, displaying a message prompt of successful verification; or
And when the value of the display control parameter is a second preset value, not displaying a message prompt of successful verification.
In the embodiment of the present application, when a display control parameter is added to a configuration item of Validform, different values of the display control parameter may be set to distinguish whether to display a message prompt that is successfully verified.
Optionally, the first preset value is true or 1, and the second preset value is false or 0.
Optionally, the display control parameter may be set to showSuc, and when validating a Validform, the display control parameter is added to an Option of the Validform;
if the value of showSuc is set to True, indicating that a message prompt with successful verification is displayed;
and if the showSuc value is set to False, indicating that a message prompt with successful verification is not displayed.
According to the method for improving the Validform, provided by the embodiment of the application, in the process of executing the form verification Validform, the display control parameter in the Validform configuration item is detected, and whether the message prompt of successful verification is displayed or not is determined according to the value of the display control parameter. If the display control parameter exists and the value is the successful verification display, displaying a message prompt of successful verification; and if the value of the display control parameter is that the verification is successful and the display is not carried out, not displaying the message prompt of the successful verification. By the method, corresponding judgment on each form element is not needed during verification of each form, and only the value of the display control parameter is needed to be judged, so that the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, and the development process of the application program can be simplified.
As shown in fig. 2, an embodiment of the present application further provides an apparatus for improving form verification Validform, including:
the detection module 22 is used for detecting the display control parameters in the configuration items in the process of executing the form verification Validform;
and the judging module 24 is configured to determine whether to display a message prompt that the verification is successful according to the value of the display control parameter.
In the apparatus for improving Validform provided in the embodiment of the present application, the detection module detects the display control parameter in the Validform configuration item during executing form verification Validform, and the determination module determines whether to display a message prompt indicating that verification is successful according to the value of the display control parameter. For example, if there is a display control parameter and the value of the display control parameter is a verification successful display, displaying a message prompt of the verification success; and if the value of the display control parameter is that the verification is successful and the display is not carried out, not displaying the message prompt of the successful verification. By the device, corresponding judgment on each form element is not needed when each form is verified, and only the value of the display control parameter is needed to be judged, the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, so that the development process of the application program can be simplified.
Optionally, the apparatus for improving Validform provided in the embodiment of the present application further includes:
and the setting module 20 is configured to add the display control parameter to a configuration item of the Validform when the Validform is instantiated.
Optionally, in the above apparatus, the determining whether to display the message prompt that the verification is successful according to the value of the display control parameter includes:
when the value of the display control parameter is a first preset value, displaying a message prompt of successful verification; or
And when the value of the display control parameter is a second preset value, not displaying a message prompt of successful verification.
Optionally, in the above apparatus, the first preset value is true or 1, and the second preset value is false or 0.
Optionally, in the apparatus, the setting module is specifically configured to add the display control parameter showSuc to an Option of Validform when validating the Validform in an instantiation process of the Validform;
when the value of showSuc is set to True, indicating that message prompt of successful verification is displayed;
and when the showSuc value is set to False, indicating that the message prompt with successful verification is not displayed.
According to the device for improving the Validform, provided by the embodiment of the application, when the Validform is verified by an instantiation form, the setting module adds the display control parameter into a configuration item of the Validform; the method comprises the steps that a detection module detects display control parameters in a Validform configuration item in the process of executing form verification Validform; and the judging module determines whether to display the message prompt of successful verification according to the value of the display control parameter. If the display control parameter exists and the value of the display control parameter is successfully verified and displayed, displaying a message prompt of successful verification; and if the value of the display control parameter is that the verification is successful and the display is not carried out, not displaying the message prompt of the successful verification. By the device, corresponding judgment on each form element is not needed when each form is verified, and only the value of the display control parameter is needed to be judged, the message prompt with successful verification can be determined to be displayed or the disappearing prompt with successful verification can not be displayed, so that the development process of the application program can be simplified.
The invention is described in further detail below by means of an exemplary embodiment.
The related routines of the existing Validform plug-in are as follows:
Figure BDA0001823340610000071
the original plug-in Validform binds and verifies each element, and when the form is submitted or verified, a number matching icon is displayed and characters for correct prompt are displayed after the verification is passed. However, some form application scenarios do not need to show that the form verification is successful, and only need to show error information. The original plug-in has no configuration item to show how correct information can be removed by one key. If the prompt information with correct verification is to be removed, the source code of Validform needs to be read or the DOM structure displayed by the plug-in needs to be checked, and then the prompt information with correct verification is controlled not to be displayed through JS according to the DOM structure, so that the process is very complicated, and the development efficiency of the application program is influenced.
According to the method provided by the application, a display control parameter, for example, showSuc, may be added to the configuration item of the Validform, and a parameter value is set to false, so that no message prompt is performed after all elements of the Validform plug-in are verified. Examples of adding display control parameters are as follows:
$(“.registerform”).Validform({
showSuc:false
});
when the verification of the element is required to be prompted through the message, the value of the display control parameter may be modified, for example, the value of showSuc is changed from false to true.
According to the method provided by the application, the configuration item is added into the internal option of the Validform plug-in, the judgment is carried out in the code, the verification function of the original plug-in cannot be changed by the configuration item, the prompt message with correct verification can be simply controlled, the display is not required to be removed after the verification of each element is successfully judged, and therefore the development process can be effectively reduced.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (6)

1. A method for improving Validform for form verification, comprising:
in the process of executing the form verification Validform, detecting a display control parameter in the Validform configuration item;
determining whether to display a message prompt with successful verification according to the value of the display control parameter;
the determining whether to display the message prompt with successful verification according to the value of the display control parameter includes:
when the value of the display control parameter is a first preset value, displaying a message prompt of successful verification; alternatively, the first and second electrodes may be,
when the value of the display control parameter is a second preset value, not displaying a message prompt of successful verification;
before the detecting the display control parameter in the Validform configuration item, the method further includes:
adding configuration items into the internal options of the form verification Validform;
when the Validform is instantiated, a display control parameter is added to a configuration item of the Validform.
2. The method for improving form validation Validform of claim 1,
the first preset value is true or 1, and the second preset value is false or 0.
3. The method for improving form validation Validform of claim 1,
when the value of the display control parameter is set to True, indicating that the display verification is successful;
when the value of the display control parameter is set to False, the message prompt that the verification is successful is not displayed.
4. An apparatus for improving Validform for form verification, comprising:
the detection module is used for detecting the display control parameters in the configuration items in the process of executing the form verification Validform;
the judging module is used for determining whether to display the message prompt of successful verification according to the value of the display control parameter;
the determining whether to display the message prompt with successful verification according to the value of the display control parameter includes:
when the value of the display control parameter is a first preset value, displaying a message prompt of successful verification; alternatively, the first and second electrodes may be,
when the value of the display control parameter is a second preset value, not displaying a message prompt of successful verification;
the setting module is used for adding configuration items into the internal options of the form verification Validform before detecting the display control parameters in the Validform configuration items; when the Validform is instantiated, a display control parameter is added to a configuration item of the Validform.
5. The apparatus for improving form validation Validform of claim 4,
the first preset value is true or 1, and the second preset value is false or 0.
6. The apparatus for improving form validation Validform of claim 4,
the setting module is specifically configured to:
when the value of the display control parameter is set to True, indicating that the message prompt of successful verification is displayed;
and when the value of the display control parameter is set to be False, indicating that the message prompt of successful verification is not displayed.
CN201811174476.1A 2018-10-09 2018-10-09 Method and device for improving form verification Validform Active CN109324841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811174476.1A CN109324841B (en) 2018-10-09 2018-10-09 Method and device for improving form verification Validform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811174476.1A CN109324841B (en) 2018-10-09 2018-10-09 Method and device for improving form verification Validform

Publications (2)

Publication Number Publication Date
CN109324841A CN109324841A (en) 2019-02-12
CN109324841B true CN109324841B (en) 2021-11-26

Family

ID=65261132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811174476.1A Active CN109324841B (en) 2018-10-09 2018-10-09 Method and device for improving form verification Validform

Country Status (1)

Country Link
CN (1) CN109324841B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836509B (en) * 2021-09-23 2024-03-01 百度在线网络技术(北京)有限公司 Information acquisition method, device, electronic 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
CN107766124A (en) * 2017-10-26 2018-03-06 福建星瑞格软件有限公司 A kind of automatic verification method and device of WEB lists

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
CN107766124A (en) * 2017-10-26 2018-03-06 福建星瑞格软件有限公司 A kind of automatic verification method and device of WEB lists

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Validform里面如何关闭成功提示?;百度知道;《https://zhidao.baidu.com/question/1960513244498237300.html》;20151210;全文 *

Also Published As

Publication number Publication date
CN109324841A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
US10372914B2 (en) Validating firmware on a computing device
CN110032880B (en) Screen recording evidence obtaining method and system based on block chain and electronic equipment
CN109033772B (en) Verification information input method and device
CN111931731B (en) Question judging method and device, electronic equipment and storage medium
JP2019505056A (en) Electronic payment service processing method and device, and electronic payment method and device
CN107733883B (en) Method and device for detecting account numbers registered in batches
CN107491328A (en) Updating firmware program method, system and electric equipment
CN109145590B (en) Function hook detection method, detection equipment and computer readable medium
CN109324841B (en) Method and device for improving form verification Validform
CN106789973B (en) Page security detection method and terminal equipment
EP3021252A1 (en) Method and apparatus for preventing injection-type attack in web-based operating system
CN113438225B (en) Vehicle-mounted terminal vulnerability detection method, system, equipment and storage medium
CN108765786A (en) Quick Response Code withdrawal safe verification method and its system, computer storage media
CN117391099A (en) Data downloading and checking method and system for smart card and storage medium
CN109783450B (en) Data processing method and device and computer equipment
CN107479923A (en) Application program updating method, apparatus and display terminal
US11914466B2 (en) Systems and methods for pause-correct-replay workflow customization
CN106878248A (en) A kind of verification method and equipment
CN107483534B (en) Service processing method and device
JP6563001B2 (en) System and method for detecting and alerting to risks in replenishment transactions
CN111800496B (en) Interface calling method, device, computer equipment and storage medium
CN113033530A (en) Certificate copying detection method and device, electronic equipment and readable storage medium
CN113849674A (en) Method and device for identifying disguised user agent information and electronic equipment
CN108200060A (en) Single sign-on authentication method, server and storage medium based on web subsystems
CN115065670B (en) IOS APP automatic release method, macOS server and system

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
GR01 Patent grant
GR01 Patent grant