Giter VIP home page Giter VIP logo

Comments (15)

any86 avatar any86 commented on May 18, 2024

可以, 但是我第一次听说vin, 你简答说下格式要求, 我也百度下格式

from any-rule.

any86 avatar any86 commented on May 18, 2024

车架号啊, 是要匹配国际, 还是只要**即可?

from any-rule.

Hyebin98 avatar Hyebin98 commented on May 18, 2024

应该是国际标准,公司有一些进口车
示例 : 1G1BL52P7TR115520
信息为:1996年、GM(或Suzuki)、产地:美国。
tonylei
May 17 2006, 12:18 PM

from any-rule.

any86 avatar any86 commented on May 18, 2024

好的, 我写下, 等会 🐳

from any-rule.

Hyebin98 avatar Hyebin98 commented on May 18, 2024

好的,谢谢您了

from any-rule.

any86 avatar any86 commented on May 18, 2024

https://jingyan.baidu.com/album/5bbb5a1b1dad7413eaa1796e.html?picindex=2

https://baike.baidu.com/item/%E8%BD%A6%E8%BE%86%E8%AF%86%E5%88%AB%E5%8F%B7%E7%A0%81/4338309?fr=aladdin

这个规则有没有精准的说明, 看了几个感觉都不一样呢, 不知道那个对, 而且感觉好像都不对, 我先教你几个关键的知识点, 如果你对他的规则很了解你先自己试试,下面的知识点应该就够了, 我也在仔细看下他的规则:

/^[1-6,9,w,t]$/ // 匹配1到6和9和w和t

/[0-9,A-Z]/ // 匹配数字和大写字母

/^[^1]$/ // 不包含数字1

from any-rule.

Hyebin98 avatar Hyebin98 commented on May 18, 2024

嗯,好的,谢谢您了

from any-rule.

any86 avatar any86 commented on May 18, 2024

https://blog.csdn.net/shenhonglei1234/article/details/53103161
https://blog.csdn.net/ajianchina/article/details/70227234
这规则我是真没看明白, 我现在给你一个校验了位数/第一位国家编码的正则, 看看够不够你们用:

/^[1-6,9,J,K,L,R,S,T,V,W,Y,Z][0-9,A-Z,a-z]{16}$/.test('1G1BL52P7TR115520') // true

from any-rule.

any86 avatar any86 commented on May 18, 2024

我想起了手机号的正则, 之前做过调查, 很多人因为怕录入不进去都只是匹配11为数字即当做手机号, 至于手机号是否合法都交给了后端在数据库中验证 ,你这个是不是也一样呢?

https://juejin.im/pin/5d1ea9b6518825026ec4c5c7

from any-rule.

Hyebin98 avatar Hyebin98 commented on May 18, 2024

前后端都要校验,这个vin我也不太懂,应该够用了,真是麻烦您了,谢谢您

from any-rule.

any86 avatar any86 commented on May 18, 2024

客气客气, 我本来想给你写全面点的, 但是真是没读懂vin的规则.. 🐳

from any-rule.

Hyebin98 avatar Hyebin98 commented on May 18, 2024

我昨天看了一天,它这个有不同的说法,没有准确的信息,做起来有难度

from any-rule.

any86 avatar any86 commented on May 18, 2024

我看好像有个校验位还要做"余数"计算, 那个正则恐怕做不了.
既然后端也验证, 为了保险起见, 我建议用这条:

/^[0-9,A-Z,a-z]{17}$/.test('1G1BL52P7TR115520') // true

万一哪天哪个小国加入了呢...

from any-rule.

Hyebin98 avatar Hyebin98 commented on May 18, 2024

好的,麻烦您了,谢谢

from any-rule.

any86 avatar any86 commented on May 18, 2024

客气 🐳

from any-rule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.