CN109324841A - A kind of method and device for improving form validation Validform - Google Patents

A kind of method and device for improving form validation Validform Download PDF

Info

Publication number
CN109324841A
CN109324841A CN201811174476.1A CN201811174476A CN109324841A CN 109324841 A CN109324841 A CN 109324841A CN 201811174476 A CN201811174476 A CN 201811174476A CN 109324841 A CN109324841 A CN 109324841A
Authority
CN
China
Prior art keywords
validform
proved
successful
display control
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.)
Granted
Application number
CN201811174476.1A
Other languages
Chinese (zh)
Other versions
CN109324841B (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

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 present invention provides a kind of method and devices for improving form validation Validform, which comprises during executing form validation Validform, detects the display control parameter in the Validform configuration item;The message notifying that display is proved to be successful is determined whether according to the value of the display control parameter.According to method and device provided by the present application, it does not need to make corresponding judgement to each Form Element in each form validation, it need to only judge the value of display control parameter, it can determine the message notifying or do not show the disappearance prompt being proved to be successful that display is proved to be successful, can simplify the development process of application program.

Description

A kind of method and device for improving form validation Validform
Technical field
The present invention relates to form validation Validform technology, espespecially a kind of method for improving form validation Validform and Device.
Background technique
Form validation Validform is one of the Advanced Options in Javascript.Validform can be used in data quilt These input datas in HTML form are verified before being sent to server, to mitigate back-end data transmission pressure, improve number According to the quality and efficiency of transmission.Validform gives each element binding validatation, when list submission or form validation, A check mark icon can be shown after being verified and shows the text correctly prompted.Therefore, selected verification tip message it Afterwards, no matter Validform is proved to be successful or failure all can prompting message.And some forms application scenes are not need to show list It is proved to be successful, it is only necessary to show error message.Correct prompt information needs are verified by reading source code or reading if wanting to go to and falling this Then DOM structure is controlled by JS according to DOM structure and is not shown the correct prompt information of verifying, on each Form Element Duplicate contents are set, the development efficiency of application program is influenced.
Summary of the invention
In order to solve the above-mentioned technical problem, the embodiment of the invention provides a kind of sides for improving form validation Validform Method and device can determine whether the message notifying that display is proved to be successful according to the value of display control parameter.
In order to reach the object of the invention, the embodiment of the invention provides it is a kind of improve form validation Validform method, Include:
During executing form validation Validform, the display control ginseng in the Validform configuration item is detected Number;
The message notifying that display is proved to be successful is determined whether according to the value of the display control parameter.
Compared with prior art, the method provided by the embodiments of the present application for improving Validform is executing form validation During Validform, the display control parameter in the Validform configuration item is detected, according to the display control parameter Value determine whether the message notifying that is proved to be successful of display.By the present processes, do not need in each form validation pair Each Form Element makes corresponding judgement, need to only judge the value of display control parameter, that is, can determine the message that display is proved to be successful Prompt does not show the disappearance prompt being proved to be successful, and can simplify the development process of application program.
Optionally, the Validform is added when instantiating form validation Validform in the display control parameter Configuration item in.
Optionally, the value according to the display control parameter determines whether the message notifying that display is proved to be successful, packet It includes:
When the value of the display control parameter is the first preset value, the message notifying being proved to be successful is shown;Or
When the value of the display control parameter is the second preset value, the message notifying being proved to be successful is not shown.
Optionally, first preset value is true or 1, and second preset value is false or 0.
Optionally, the display control parameter is showSuc, when instantiating form validation Validform, described in addition In the Option option of Validform;
When the value of the showSuc is set as True, the message notifying that display is proved to be successful is indicated;
When the value of the showSuc is set as False, expression does not show the message notifying being proved to be successful.
The method provided by the embodiments of the present application for improving Validform, during executing form validation Validform, The display control parameter in the Validform configuration item is detected, determines whether to show according to the value of the display control parameter The message notifying being proved to be successful.If there is display control parameter, and its value is to be proved to be successful display, then display is proved to be successful Message notifying;If the value of display control parameter is to be proved to be successful not showing, the message notifying being proved to be successful is not shown.Pass through The present processes do not need to make corresponding judgement to each Form Element in each form validation, need to only judge display control The value of parameter processed can determine message notifying or do not show the disappearance prompt being proved to be successful that display is proved to be successful, can simplify The development process of application program.
To solve the above problems, the embodiment of the present application also provides a kind of device for improving form validation Validform, packet It includes:
Detection module, for during executing form validation Validform, detecting the display control ginseng in configuration item Number;
Judgment module shows the message notifying being proved to be successful for determining whether according to the value of the display control parameter.
Further, described device, further includes:
Setup module will be described in display control parameter addition for when instantiate form validation Validform In the configuration item of Validform.
Optionally, the value according to the display control parameter determines whether the message notifying that display is proved to be successful, packet It includes:
When the value of the display control parameter is the first preset value, the message notifying being proved to be successful is shown;Or
When the value of the display control parameter is the second preset value, the message notifying being proved to be successful is not shown.
Optionally, first preset value is true or 1, and second preset value is false or 0.
Optionally, the setup module is specifically used for when instantiating form validation Validform, described The display control parameter showSuc is added in the Option option of Validform;
When the value that the showSuc is arranged is True, the message notifying that display is proved to be successful is indicated;
When the value that the showSuc is arranged is False, expression does not show the message notifying being proved to be successful.
The device provided by the embodiments of the present application for improving Validform, during executing form validation Validform, The display control parameter in the Validform configuration item is detected, determines whether to show according to the value of the display control parameter The message notifying being proved to be successful.If there is display control parameter, and its value is to be proved to be successful display, then display is proved to be successful Message notifying;If the value of display control parameter is to be proved to be successful not showing, the message notifying being proved to be successful is not shown.Pass through The present processes do not need to make corresponding judgement to each Form Element in each form validation, need to only judge display control The value of parameter processed can determine message notifying or do not show the disappearance prompt being proved to be successful that display is proved to be successful, can simplify The development process of application program.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is a kind of method for improving form validation Validform provided by the embodiments of the present application;
Fig. 2 is a kind of device for improving form validation Validform provided by the embodiments of the present application.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable Sequence executes shown or described step.
As shown in Figure 1, the embodiment of the present application provides a kind of method for improving form validation Validform, comprising:
Step S10: during executing form validation Validform, the display in the Validform configuration item is detected Control parameter;
Step S12: the message notifying that display is proved to be successful is determined whether according to the value of the display control parameter.
The method provided by the embodiments of the present application for improving Validform, during executing form validation Validform, The display control parameter in the Validform configuration item is detected, determines whether to show according to the value of the display control parameter The message notifying being proved to be successful.For example, if there is display control parameter, and the value of display control parameter is aobvious to be proved to be successful Show, then shows the message notifying being proved to be successful;If display control parameter is to be proved to be successful not showing, does not show and be proved to be successful Message notifying.By the present processes, do not need to make corresponding judgement to each Form Element in each form validation, The value that need to only judge display control parameter, that is, can determine the message notifying or do not show the disappearance being proved to be successful that display is proved to be successful Prompt, can simplify the development process of application program.
It optionally, may include step S08 before step S10: when instantiating form validation Validform, in institute It states and the display control parameter is added in the configuration item of Validform.
For example, display control can be added in the configuration item of Validform when instantiating form validation Validform Parameter processed, for example, showSuc.
Further, the value according to the display control parameter determines whether the message notifying that display is proved to be successful, Include:
When the value of the display control parameter is the first preset value, the message notifying being proved to be successful is shown;Or
When the value of the display control parameter is the second preset value, the message notifying being proved to be successful is not shown.
The display can be set when adding display control parameter in the configuration item of Validform in embodiments herein The different value of control parameter, to distinguish whether show the message notifying being proved to be successful.
Optionally, first preset value is true or 1, and second preset value is false or 0.
Optionally, the display control parameter can be set to showSuc, when instantiating form validation Validform, It is added in the Option option of the Validform;
If the value that the showSuc is arranged is True, then it represents that show the message notifying being proved to be successful;
If the value that the showSuc is arranged is False, then it represents that do not show the message notifying being proved to be successful.
The method provided by the embodiments of the present application for improving Validform, during executing form validation Validform, The display control parameter in the Validform configuration item is detected, determines whether to show according to the value of the display control parameter The message notifying being proved to be successful.If there is display control parameter, and its value is to be proved to be successful display, then display is proved to be successful Message notifying;If the value of display control parameter is to be proved to be successful not showing, the message notifying being proved to be successful is not shown.Pass through The present processes do not need to make corresponding judgement to each Form Element in each form validation, need to only judge display control The value of parameter processed can determine message notifying or do not show the disappearance prompt being proved to be successful that display is proved to be successful, can simplify The development process of application program.
As described in Figure 2, the embodiment of the present application also provides a kind of devices for improving form validation Validform, comprising:
Detection module 22, for during executing form validation Validform, detecting the display control ginseng in configuration item Number;
Judgment module 24, the message for determining whether that display is proved to be successful according to the value of the display control parameter mention Show.
The device provided by the embodiments of the present application for improving Validform, detection module are executing form validation Validform In the process, the display control parameter in the Validform configuration item is detected, judgment module is according to the display control parameter Value determines whether the message notifying that display is proved to be successful.For example, if there is display control parameter and the value of display control parameter To be proved to be successful display, then the message notifying being proved to be successful is shown;If the value of display control parameter is to be proved to be successful not showing, The message notifying being proved to be successful is not shown then.By the device of the application, do not need in each form validation to each list Element makes corresponding judgement, need to only judge the value of display control parameter, that is, can determine message notifying that display is proved to be successful or not It shows the disappearance prompt being proved to be successful, can simplify the development process of application program.
Optionally, the device provided by the embodiments of the present application for improving Validform, further includes:
Setup module 20 will be described in display control parameter addition for when instantiate form validation Validform In the configuration item of Validform.
Optionally, in above-mentioned apparatus, the value according to the display control parameter determines whether that display is proved to be successful Message notifying, comprising:
When the value of the display control parameter is the first preset value, the message notifying being proved to be successful is shown;Or
When the value of the display control parameter is the second preset value, the message notifying being proved to be successful is not shown.
Optionally, in above-mentioned apparatus, first preset value is true or 1, and second preset value is false or 0.
Optionally, in above-mentioned apparatus, the setup module is specifically used for when instantiating form validation Validform, The display control parameter showSuc is added in the Option option of the Validform;
When the value that the showSuc is arranged is True, the message notifying that display is proved to be successful is indicated;
When the value that the showSuc is arranged is False, expression does not show the message notifying being proved to be successful.
The device provided by the embodiments of the present application for improving Validform, setup module is in instantiation form validation When Validform, the display control parameter is added in the configuration item of the Validform;Detection module is executing list During verifying Validform, the display control parameter in the Validform configuration item is detected;Judgment module is according to The value of display control parameter determines whether the message notifying that display is proved to be successful.If there is display control parameter, and it is described aobvious The value for showing control parameter is to be proved to be successful display, then shows the message notifying being proved to be successful;If the value of display control parameter is It is proved to be successful and does not show, then do not show the message notifying being proved to be successful.By the device of the application, do not need to test in each list Corresponding judgement is made to each Form Element when card, need to only judge the value of display control parameter, that is, can determine that display is proved to be successful The disappearance prompt that is proved to be successful of message notifying or do not show, can simplify the development process of application program.
Below by an exemplary embodiment, the present invention is described in further detail.
The dependent routine of existing Validform plug-in unit is as follows:
Former plug-in unit Validform gives each element binding validatation, and when list submission or form validation, verifying is logical A check mark icon can be shown after crossing and shows the text correctly prompted.But some forms application scenes are not need to open up Show form validation success, it is only necessary to show error message.Former plug-in unit does not have configuration item to illustrate how can remove correctly with a key The prompt of information.If it is desired to removing this verifies correct prompt information, needs to read the source code of Validform or check the plug-in unit Then the DOM structure shown is controlled by JS according to DOM structure and is not shown the correct prompt information of verifying, this mistake Cheng Feichang is cumbersome, influences the development efficiency of application program.
According to method provided by the present application, display control parameter can be added in the configuration item of Validform, for example, ShowSuc, and it is false that parameter value, which is arranged, then all elements of Validform plug-in unit all no longer disappear after being verified Breath prompt.The example for adding display control parameter is as follows:
$(“.registerform”).Validform({
showSuc:false
});
When needing to element when being verified message and prompting, the value of display control parameter can be modified, such as will The value of showSuc is changed to true by false.
Method provided by the present application is added configuration item in option inside the Validform plug-in unit, is sentenced inside code Disconnected, this configuration item will not change the authentication function of former plug-in unit, can simply control correct prompt information is verified, no It needs to judge to remove display after each element is proved to be successful, so as to effectively reduce development process.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment, Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain groups Part or all components may be implemented as by processor, such as the software that digital signal processor or microprocessor execute, or by It is embodied as hardware, or is implemented as integrated circuit, such as specific integrated circuit.Such software can be distributed in computer-readable On medium, computer-readable medium may include computer storage medium (or non-transitory medium) and communication media (or temporarily Property medium).As known to a person of ordinary skill in the art, term computer storage medium is included in for storing information (such as Computer readable instructions, data structure, program module or other data) any method or technique in the volatibility implemented and non- Volatibility, removable and nonremovable medium.Computer storage medium include but is not limited to RAM, ROM, EEPROM, flash memory or its His memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic holder, tape, disk storage or other Magnetic memory apparatus or any other medium that can be used for storing desired information and can be accessed by a computer.This Outside, known to a person of ordinary skill in the art to be, communication media generally comprises computer readable instructions, data structure, program mould Other data in the modulated data signal of block or such as carrier wave or other transmission mechanisms etc, and may include any information Delivery media.

Claims (10)

1. a kind of method for improving form validation Validform characterized by comprising
During executing form validation Validform, the display control parameter in the Validform configuration item is detected;
The message notifying that display is proved to be successful is determined whether according to the value of the display control parameter.
2. the method according to claim 1 for improving Validform, which is characterized in that wherein,
The display control parameter is added in the configuration item of the Validform when instantiating form validation Validform.
3. the method according to claim 1 for improving Validform, which is characterized in that described according to the display control The value of parameter determines whether the message notifying that display is proved to be successful, comprising:
When the value of the display control parameter is the first preset value, the message notifying being proved to be successful is shown;Or
When the value of the display control parameter is the second preset value, the message notifying being proved to be successful is not shown.
4. the method according to claim 3 for improving Validform, which is characterized in that
First preset value is true or 1, and second preset value is false or 0.
5. the method according to claim 2 for improving Validform, which is characterized in that
The display control parameter is that showSuc is added the Validform's when instantiating form validation Validform In Option option;
When the value of the showSuc is set as True, the message notifying that display is proved to be successful is indicated;
When the value of the showSuc is set as False, expression does not show the message notifying being proved to be successful.
6. a kind of device for improving form validation Validform characterized by comprising
Detection module, for detecting the display control parameter in configuration item during executing form validation Validform;
Judgment module shows the message notifying being proved to be successful for determining whether according to the value of the display control parameter.
7. the device according to claim 6 for improving Validform, which is characterized in that further include:
Setup module will be described in display control parameter addition for when instantiate form validation Validform In the configuration item of Validform.
8. the device according to claim 6 for improving Validform, which is characterized in that described according to the display control The value of parameter determines whether the message notifying that display is proved to be successful, comprising:
When the value of the display control parameter is the first preset value, the message notifying being proved to be successful is shown;Or
When the value of the display control parameter is the second preset value, the message notifying being proved to be successful is not shown.
9. the device according to claim 8 for improving Validform, which is characterized in that
First preset value is true or 1, and second preset value is false or 0.
10. the device according to claim 7 for improving Validform, which is characterized in that
The setup module is specifically used for when instantiating form validation Validform, selects in the Option of the Validform The display control parameter showSuc is added in;
When the value that the showSuc is arranged is True, the message notifying that display is proved to be successful is indicated;
When the value that the showSuc is arranged is False, expression does not show the message notifying being proved to be successful.
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 true CN109324841A (en) 2019-02-12
CN109324841B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836509A (en) * 2021-09-23 2021-12-24 百度在线网络技术(北京)有限公司 Information acquisition method and 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》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836509A (en) * 2021-09-23 2021-12-24 百度在线网络技术(北京)有限公司 Information acquisition method and device, electronic equipment and storage medium
CN113836509B (en) * 2021-09-23 2024-03-01 百度在线网络技术(北京)有限公司 Information acquisition method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109324841B (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN108881126B (en) Method, device and system for verifying verification code, storage medium and computer terminal
CN105631361B (en) A kind of application program channel source identification method and device
WO2016003531A1 (en) Classifying a program interacting with a system using questioning and fingerprinting
CN101539974A (en) Detecting, capturing and processing valid login credentials
CN104978530B (en) A kind of application method for managing security, device, server and system
CN107943502A (en) A kind of upgrade method based on the detection of fine granularity system mode under linux system
US9811827B2 (en) System and method for providing transaction verification
WO2016068974A1 (en) System and method for vulnerability remediation verification
CA3197109A1 (en) Web-based activation of contactless cards
US20130191641A1 (en) Captcha (completely automated public test to tell computers and humans apart) data generation methods and related data management systems and computer program products thereof
EP2763106A2 (en) Access control system and method with GPS location validation
CN109324841A (en) A kind of method and device for improving form validation Validform
CN106934383B (en) The recognition methods of picture markup information, device and server in file
CN111327570B (en) Authentication method, apparatus and computer-readable storage medium
CN112166449A (en) Method of processing secure financial transactions using commercial off-the-shelf or internet-of-things devices
CN107547538A (en) A kind of resource data processing method and processing device
KR101899887B1 (en) Deep card reader
CN108171060A (en) Method, system and the storage medium of encryption deformation script are identified based on comentropy
CN106878248A (en) A kind of verification method and equipment
CN109635549A (en) A kind of method and device verified in automatic test
CN110134639B (en) Equipment information storage position identification method and device
CA3048710A1 (en) Systems and methods for the secure entry and authentication of confidential access codes for access to a user device
US7840814B2 (en) Method for managing an executable code downloaded in a reprogrammable on-board system
EP3467693A1 (en) Identity verification method and apparatus
JP2009122833A (en) Application processor, application processing method, program thereof and embedded equipment

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