Skip to content

Commit d2176e0

Browse files
committed
Fix URL regexp.
1 parent 41fccfc commit d2176e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ function Framework() {
594594

595595
this.validators = {
596596
email: new RegExp('^[a-zA-Z0-9-_.+]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'),
597-
url: /^(https?:\/\/(?:www\.|(?!www))[^\s\.#!:\?\+=&@!$'~*,;\/\(\)\[\]]+\.[^\s#!\?\+=&@!$'~*,;\(\)\[\]\\]{2,}\/?|www\.[^\s#!:\.\?\+=&@!$'~*,;\/\(\)\[\]]+\.[^\s#!\?\+=&@!$'~*,;\(\)\[\]\\]{2,}\/?)$/i,
597+
url: /^(https?:\/\/(?:www\.|(?!www))[^\s\.#!:\?\+=&@!$'~*,;\/\(\)\[\]]+\.[^\s#!\?\+=&@!$'~*,;\(\)\[\]\\]{2,}\/?|www\.[^\s#!:\.\?\+=&@!$'~*,;\/\(\)\[\]]+\.[^\s#!\?\+=&@!$'~*,;\(\)\[\]\\]{2,}\/?)/i,
598598
phone: /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im,
599599
zip: /^\d{5}(?:[-\s]\d{4})?$/,
600600
uid: /^\d{14,}[a-z]{3}[01]{1}$/

0 commit comments

Comments
 (0)