1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2024-12-12 08:46:34 +01:00

Merge pull request #1 from sfabel/validator-domainFormat-fix

Update validator.ts
This commit is contained in:
Stephan Fabel 2022-11-09 16:53:12 -08:00 committed by GitHub
commit bfe9589b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1 +1 @@
export const domainFormat = /^[a-zA-Z0-9][a-zA-Z0-9-.]{0,61}[a-zA-Z0-9]\.[a-zA-Z0-9]{2,}$/ export const domainFormat = /^(((?!\-))(xn\-\-)?[a-z0-9\-_]{0,61}[a-z0-9]{1,1}\.)*(xn\-\-)?([a-z0-9\-]{1,61}|[a-z0-9\-]{1,30})\.[a-z]{2,}$/