How to operate vue input input to verify the alphanumeric combination and the length is less than 30

php中世界最好的语言
Release: 2018-05-29 14:55:14
Original
6814 people have browsed it

This time I will show you how to operate vue input to input a verification alphanumeric combination and the length is less than 30. How to operate vue input to enter a verification alphanumeric combination and the length is less than 30.What are the precautions?are as follows. This is a practical case, let’s take a look at it.

The following code is for everyone to share with you the vue input verification alphanumeric combination and the length is less than 30. The specific code is as follows:

 validateJyh(glhm){//校验关联交易号 var reg = /^[A-Za-z0-9]{1,30}$/; if(!reg.test(glhm)){ this.$Message.error("请输入字母或数字组成的交易关联号"); this.form.glhm = ''; } },
Copy after login

Look below in Vue.Js The el-input box can only be used to enter numbers and limit the number of digits. It also limits Chinese input and paste

var tr = document.getElementById("Id1"), // 取得ID为Id1的tr对象 inps = tr.getElementsByTagName('input'); // 从tr 对象中获取所有input对象 for(var i = 0, len = inps.length; i < len; i++) { inps[i].value = ''; // 将每一个input的value置为空 } document.getElementById("t").getElementsByTagName('input')[0].value='';
Copy after login

How to enter Chinese and leave it blank

 次  checkNo(value){ let reg = /^[1-9]\d*$/; if (value) { if (value > 999999 || new RegExp(reg).test(value) == false) { setTimeout(() => { this.searchForm.msel.mselTotalConsumTimes =''; }, 500); } } },
Copy after login

I believe I have read this article You have mastered the case method. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Recommended reading:

How to use Vue to make Amap and build a real-time bus application

How to use seajs in require Writing convention

The above is the detailed content of How to operate vue input input to verify the alphanumeric combination and the length is less than 30. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!