Ghost/core/server
Fabien 'egg' O'Carroll 8f660c3259
Improved settings validation (#12048)
closes #12001

* Moved settings validation to the model

This moves the settings validation out of the validation file and into
the model, as it is _only_ used there.

It also sets us up in the future for custom validators on individual
settings.

* Improved validation of stripe_plans setting

- Checks `interval` is a valid string
- Checks `name` & `currency` are strings

* Moved stripe key validation into model

The stripe key settings are all nullable and the regex validation fails
when the input is `null`. Rather than reworking the entirety of how we
validate with default-settings validation objects, this moves the
validation into methods on the Settings model.

* Added tests for new setting validations

Adds tests for both valid and invalid settings, as well as helpers
making future tests easier and less repetitive
2020-07-15 17:11:27 +02:00
..
adapters Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
api Updated Content API resource ordering to be same as slugs in filter 2020-07-10 18:33:00 +12:00
data Improved settings validation (#12048) 2020-07-15 17:11:27 +02:00
lib 🐛 Fixed srcset and sizes attributes being rendered when image resizing unavailable 2020-07-02 18:03:22 +01:00
models Improved settings validation (#12048) 2020-07-15 17:11:27 +02:00
public Renamed members ssr + api endpoints 2020-04-30 19:00:37 +01:00
services Updated sender email to existing "from-address" (#12044) 2020-07-13 17:57:31 +05:30
translations Updated member already exists error message 2020-07-09 12:13:26 +02:00
views Updated head to only output custom favicons (#11949) 2020-06-30 15:07:08 +01:00
web Fixed integration_id handling in Webhooks Admin API 2020-07-08 16:54:31 +12:00
analytics-events.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
ghost-server.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
index.js 🐛 Fixed settings cache being out of sync after migrations (#11987) 2020-07-01 17:16:57 +01:00
overrides.js Disabled bluebird debug logs 2018-08-13 14:01:31 +02:00
update-check.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00