Validate the input data format with regular expressions

problem description

the sending address is ip port @ username @ password

jdbc:sqlserver://10.81.1.137:1433@user@root like this can be verified by

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

    LINKSTR:[
            { required: true, message: "",trigger:"blur"},
            { type:"string",pattern:""  ,message:":ip@@",trigger:"blur"}
        ],

what result do you expect? What is the error message actually seen?

prompt for the correct address format if you do not enter an address that conforms to the regular expression

Aug.11,2021

if you are lazy, just 'required'. Please fill in a prompt in the format of ip port @ user name @ password.
want to achieve different content prompts different, iview,form form has custom verification, the example and you want to achieve is similar, no prompt for password input, input password secondary verification password is different, prompt password input is different.
can refer to the official case implementation of iview. If it is not entered, it must be filled in, if it is not empty, the rule is verified, and then the callback prompts for an error.

Menu