Tag:Verification

  • Details of using forms validation in. Net MVC

    Time:2021-9-20

    . net MVC uses forms verification for your reference. The details are as follows This is how the folder is divided First set in web.config Authentication and authorization nodes <system.web> <authentication mode=”Forms”> <forms loginUrl=”~/Login/Index” timeout=”2880″ defaultUrl=”~/Home/Index”/> </authentication> <anonymousIdentification enabled=”true”/> <authorization> <deny users=”?”/> <!– Deny anonymous access — > </authorization> <compilation debug=”true” targetFramework=”4.5″ /> <httpRuntime targetFramework=”4.5″ […]

  • JSP radio button verification, drop-down box verification, check box verification implementation code

    Time:2021-8-31

    //Verify gender (radio button verification)function checkXb(){ var temp = false; var xbObj1= document.getElementById(“xb1”); var xbObj2= document.getElementById(“xb2”); if(xbObj1.checked || xbObj2.checked){ temp = true; } return temp; } function checkform() { //Verify gender (radio button verification)if(!checkXb()){ Alert (“please select gender”);return false; } //Verifier category (drop-down box)if(document.getElementById(“lb”).selectedIndex == 0){ Alert (“please select a personnel category”);return false; } } […]

  • Java regular expression validation function

    Time:2021-8-28

    Copy codeThe code is as follows: /** *Validate regular expressions* *@ author Zhujie regex string to which the regular expression value belongs* @return boolean */ public static boolean regex(String regex, String value) { Pattern p = Pattern.compile(regex); Matcher m = p.matcher(value); return m.find(); }

  • JAVA 18 Bit ID number verification algorithm

    Time:2021-8-22

    public static char doVerify(String id) { char pszSrc[]=id.toCharArray(); int iS = 0; int iW[]={7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; char szVerCode[] = new char[]{‘1′,’0’, ‘X’, ‘9’, ‘8’, ‘7’, ‘6’, ‘5’, ‘4’, ‘3’, ‘2’}; int i; for(i=0;i<17;i++) { iS += (int)(pszSrc[i]-‘0’) * iW[i]; } int […]

  • Ajax implementation of asynchronous transmission and verification example code

    Time:2021-7-8

    Ajax asynchronous transmission is widely used. Take web development as an example. When a user registers, when the user has just finished typing, how to immediately determine whether the user exists and display a prompt in the input box? This uses asynchronous transmission~~ It allows you to get the data you want in the background […]

  • HTML5 client to verify the size of the upload file (simple example)

    Time:2021-6-22

    In HTML 5, it is now possible to verify the file upload on the client. For example, after the user selects the file, the size and attributes of the file can be verified immediately. This article introduces how to verify the size of the uploaded file by HTML5 client. Interested code farmers can refer to […]

  • Verification of JWT token code instance based on Java

    Time:2021-6-6

    This article mainly introduces the example of JWT token code verification based on Java. The example code introduced in this article is very detailed, which has a certain reference learning value for everyone’s study or work. Friends in need can refer to it How to load public certificate from pem file..? address 1. Hs256 symmetric […]

  • Jsp + Ajax to achieve no refresh (the mouse leaves the text box to verify the user name) implementation ideas

    Time:2021-4-22

    Jsp + Ajax to achieve no refresh, the mouse leaves the text box to verify the user name, the operation is as follows: create a new input page, named input.jsp , Copy codeThe code is as follows: <%@ page contentType=”text/html; charset=utf-8″%> <html> <head> < title > JSP + Ajax to achieve no refresh_ Leave the […]

  • JavaScript regular expression verification function code

    Time:2021-4-8

    Using regular expression to judge whether it is Arabic numerals of 0-9 Copy codeThe code is as follows: function regIsDigit(fData) { var reg = new RegExp(“^[0-9]$”); return (reg.test(fData)); } Use this expression to get the length of the string Copy codeThe code is as follows: function regDataLength(fData) { var valLength = fData.length; var reg = […]

  • Python SSL certificate verification solution

    Time:2021-1-26

    This article mainly introduces the solution of Python SSL certificate verification problem, which is introduced in great detail through the example code. It has a certain reference learning value for everyone’s study or work, and friends who need it can refer to it 1、 SSL issues 1. When you don’t enable fiddler, the Python code […]