Added hostname to regexes (#6572)

This commit is contained in:
MatteoBiscosi 2022-06-14 11:49:52 +02:00
parent 26cfe8f320
commit 49a373fc0d
2 changed files with 2 additions and 3 deletions

View file

@ -43,8 +43,9 @@ const REGEXES = {
url: "^(https?\:\/\/[^\/\\s]+(\/.*)?)$",
emailUrl: "^smtps?:\/\/[-a-zA-Z0-9:.]{1,256}+$",
macAddress: "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$",
hostname: "^[a-zA-Z0-9._:\-]{3,250}|^[a-zA-Z0-9._:\-]{3,250}@[0-9]{0,5}",
username: "^(?=[a-zA-Z0-9._@!-?]{3,30}$)(?!.*[_.]{2})[^_.].*[^_.]$",
singleword: "^(?=[a-zA-Z0-9._\-]{3,253}$)(?!.*[_.\-]{2})[^_.\-].*[^_.\-]$",
singleword: "^(?=[a-zA-Z0-9._:\-]{3,253}$)(?!.*[_.:\-]{2})[^_.:\-].*[^_.:\-]$",
email: "^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)$",
https: "^https?://.+$",
token: "^[0-9a-f]{32}",