remove url validation

This commit is contained in:
David Burles
2016-11-12 10:55:54 +11:00
committed by Ben Newman
parent 180ce53633
commit 9ac8df351f

View File

@@ -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,