mirror of
https://github.com/jlengrand/coffeechat.git
synced 2026-03-10 08:11:20 +00:00
update how to validate URLs + don't accept non-HTTPS ones
This commit is contained in:
25
schema.json
25
schema.json
@@ -48,23 +48,28 @@
|
||||
},
|
||||
"website": {
|
||||
"description": "Website URL",
|
||||
"$ref": "#/definitions/validURL"
|
||||
"type": "string",
|
||||
"pattern": "(^https://)|(^$)"
|
||||
},
|
||||
"linkedin": {
|
||||
"description": "LinkedIn profile URL",
|
||||
"$ref": "#/definitions/validURL"
|
||||
"type": "string",
|
||||
"pattern": "(^https://)|(^$)"
|
||||
},
|
||||
"twitter": {
|
||||
"description": "Twitter account URL",
|
||||
"$ref": "#/definitions/validURL"
|
||||
"type": "string",
|
||||
"pattern": "(^https://)|(^$)"
|
||||
},
|
||||
"mastodon": {
|
||||
"description": "Mastodon account URL",
|
||||
"$ref": "#/definitions/validURL"
|
||||
"type": "string",
|
||||
"pattern": "(^https://)|(^$)"
|
||||
},
|
||||
"scheduling": {
|
||||
"description": "Scheduling platform URL or mailto link",
|
||||
"$ref": "#/definitions/validScheduling"
|
||||
"type": "string",
|
||||
"pattern": "(^https://)|(^mailto:)"
|
||||
},
|
||||
"online-only": {
|
||||
"description": "Whether you are open to in-person Coffee Chat (default: false)",
|
||||
@@ -92,15 +97,5 @@
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"validURL": {
|
||||
"type": "string",
|
||||
"pattern": "(^https?://)|(^$)"
|
||||
},
|
||||
"validScheduling": {
|
||||
"type": "string",
|
||||
"pattern": "(^https?://)|(^mailto:)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user