1 | /*!
|
2 | * Copyright (c) 2012-2018 Digital Bazaar, Inc. All rights reserved.
|
3 | */
|
4 | const bedrock = require('bedrock');
|
5 |
|
6 | const schema = {
|
7 | title: 'URL',
|
8 | description: 'A universal resource location.',
|
9 | type: 'string',
|
10 | minLength: 1,
|
11 | errors: {
|
12 | invalid: 'Please enter a valid URL.',
|
13 | missing: 'Please enter a URL.'
|
14 | }
|
15 | };
|
16 |
|
17 | module.exports = function(extend) {
|
18 | if(extend) {
|
19 | return bedrock.util.extend(true, bedrock.util.clone(schema), extend);
|
20 | }
|
21 | return schema;
|
22 | };
|