当前位置:网站首页>正则表达式校验版本号
正则表达式校验版本号
2022-07-29 08:30:00 【*且听风吟】
需求:校验版本号 (规则:X.Y.Z(1-99.0-99.0-99))
要求:
1)必须是三位,例如:x.x.x的形式;
2)每位x的范围分别为1-99,0-99,0-99;
3)不允许的情况:0.x.x,01.x.x,x.0x.x, x.00.x, x.x.00, x.x.0x
代码:
{
required: true,
pattern: /^[1-9]\d?(\.([1-9]?\d)){2}$/,
message: "版本号格式为:X.Y.Z(1-99.0-99.0-99)",
trigger: "blur"
}
校验成功的场景:
校验失败的场景:





边栏推荐
- Importerror: no module named XX
- Data warehouse layered design and data synchronization,, 220728,,,,
- Domestic application of ft232 replacing gp232rl usb-rs232 converter chip
- Personal study notes
- Background management system platform of new energy charging pile
- 搜索与回溯经典题型(八皇后)
- 【Transformer】ATS: Adaptive Token Sampling For Efficient Vision Transformers
- Osgsimplegl3 example analysis
- Implementation of support vector machine with ml11 sklearn
- Low cost 2.4GHz wireless transceiver chip -- ci24r1
猜你喜欢

Chrony 时间同步

Proteus simulation based on msp430f2491 (realize water lamp)

Reading papers on false news detection (4): a novel self-learning semi supervised deep learning network to detect fake news on

Eggjs create application knowledge points

MySQL statement mind map

Chrony time synchronization

Second week of postgraduate freshman training: convolutional neural network foundation

New energy shared charging pile management and operation platform

Privacy is more secure in the era of digital RMB

Stm8s003 domestic substitute for dp32g003 32-bit microcontroller chip
随机推荐
110道 MySQL面试题及答案 (持续更新)
commonjs导入导出与ES6 Modules导入导出简单介绍及使用
Osg3.6.5 failed to compile freetype
User identity identification and account system practice
Noise monitoring and sensing system
What if official account does not support markdown format file preparation?
Week 2: convolutional neural network basics
Clickhouse learning (III) table engine
Simple operation of SQL server data table
Txt plain text operation
Implementation of support vector machine with ml11 sklearn
Ar virtual augmentation and reality
Deep learning (2): image and character recognition
Normal visualization
Gan: generate adversarial networks
PostgreSQL手动创建HikariDataSource解决报错Cannot commit when autoCommit is enabled
DC motor control system based on DAC0832
pnpm install出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
【Transformer】ATS: Adaptive Token Sampling For Efficient Vision Transformers
Inclination sensor accuracy calibration test