Meteor-Community-Packages / meteor-collection2

A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.
https://packosphere.com/aldeed/collection2
MIT License
1.02k stars 108 forks source link

Insert valid url on empty string #357

Closed Deelux closed 6 years ago

Deelux commented 7 years ago

Hi there,

For some reason my values are not getting "clean'ed". In my schema I have: videoLink: { type: String, regEx: SimpleSchema.RegEx.Url, label: 'The url of the file.', optional: true},

But when I insert it into the collection I still get a insert valid url error.

How can I fix this?

aldeed commented 6 years ago

Closing old issues. Please comment if this is still an issue and should be reopened.