Input verification method

A verification method and field verification technology, applied in the field of input verification, can solve problems such as the inability to meet the needs of rapid iteration of Internet financial technology, uncontrollable risks, and increased learning costs, so as to reduce development costs and operation and maintenance costs, Guarantee the effect of unified specification and friendly interaction

Pending Publication Date: 2020-01-10
SICHUAN XW BANK CO LTD
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Obviously, this kind of repair is a long process, which cannot meet the needs of rapid iteration of Internet financial technology, and there is a problem of uncontrollable risks
[0011] 3. Developers and operation and maintenance personnel are required to understand all the built-in constraint specifications in the JSR 380 specification, which increases the learning cost

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Input verification method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] Such as figure 1 The method for input verification of the present invention shown includes:

[0026] A. According to the different verification types of the verification field in the Java system, including whether it is allowed to be empty, length and range, set the corresponding Java annotations, respectively @NotNull, @Length, @Range. Field attributes and error information corresponding to each check type are included in the Java annotation. The error information includes error codes and error descriptions corresponding to different check types. The error code is the identification code for the input value error, and the error description is the readable character description for the input value error.

[0027] Among them, the field attributes corresponding to the verification type of whether it is allowed to be empty (@NotNull) include: whether it is allowed to be empty or not, the default value is "false", which means that a null value is not allowed, and if the v...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to an input verification method, which comprises the following steps: A, respectively setting corresponding Java annotations according to different verification types of verification fields in a Java system, and enabling the Java annotations to comprise field attributes and error information corresponding to the verification types; and B, creating a verification method, wherein the verification method comprises the following steps: acquiring a specific value input to a verification field by a user and a Java annotation of the verification field through a Java object domain mechanism; and verifying the specific value according to the Java annotation of the verification field, and if the specific value does not pass the verification, throwing out an exception, wherein corresponding error information in the Java annotation is contained in the exception. According to the input verification method, the development cost and the operation and maintenance cost are greatlyreduced; developers do not need to repeatedly compile tedious verification logic codes; the developers and the operation and maintenance personnel do not need to learn complex specifications; a unified verification mode for various verification fields is achieved; and unified specifications of the codes are guaranteed.

Description

technical field [0001] The present invention relates to a data processing method, specifically a method for input verification. Background technique [0002] In the process of software system development, it is often necessary to check the validity of the user's input parameters, such as whether the input parameters are empty, whether the length is too long, whether the format conforms to the agreement, and the data range. And these verification codes are mixed with business codes, making the entire business code look bloated, and writing such verification codes frequently is very boring and time-consuming. Therefore, it is necessary to implement parameter verification in an elegant way, so that business code and verification logic can be separated, so that developers no longer write repeated verification logic. [0003] The current solution mainly implements all the built-in constraints in the JSR 380 specification through the Hibernate Validator framework. [0004] The r...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/30G06F8/73
CPCG06F8/315G06F8/73
Inventor 李长彬
Owner SICHUAN XW BANK CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products