Fix url validate issues 2
Add android hidden from the recent task Add geoip file Support modify geoData URL
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
extension StringExtension on String {
|
||||
bool get isUrl {
|
||||
return RegExp(
|
||||
r'^(https?:\/\/)?'
|
||||
r'((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|'
|
||||
r'((\d{1,3}\.){3}\d{1,3}))'
|
||||
r'(:\d+)?'
|
||||
r'(\/[-a-z\d%_.~+]*)*'
|
||||
r'(\?[;&a-z\d%_.~+=-]*)?'
|
||||
r'(\#[-a-z\d_]*)?$',
|
||||
caseSensitive: false,
|
||||
).hasMatch(this);
|
||||
return RegExp(r'^(http|https|ftp)://').hasMatch(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user