mongoose-type-url
A url field-type for Mongoose schemas
usage
This will validate a url, correctly:
var mongoose = ;; var UserSchema = url: work: mongooseSchemaTypesUrl profile: mongooseSchemaTypesUrl ;
You can also use the stuff in String
type:
var UserSchema = url: work: type: mongooseSchemaTypesUrl required: true profile: type: mongooseSchemaTypesUrl required: true ;
You can also use it as an array:
var UserSchema = urls: type: mongooseSchemaTypesUrl;