mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
remove url validation
This commit is contained in:
@@ -9,12 +9,6 @@ Meteor.methods({
|
||||
check(url, String);
|
||||
check(title, String);
|
||||
|
||||
// Check if this is a valid url
|
||||
const re = /((http|https)\:\/\/)+[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z0-9\&\.\/\?\:@\-_=#])*/g;
|
||||
if (!url.match(re)) {
|
||||
throw new Meteor.Error('Invalid URL.');
|
||||
}
|
||||
|
||||
return Links.insert({
|
||||
url,
|
||||
title,
|
||||
|
||||
Reference in New Issue
Block a user