mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
8f660c3259
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 |
||
---|---|---|
.. | ||
base | ||
plugins | ||
relations | ||
action.js | ||
api-key.js | ||
author.js | ||
email.js | ||
index.js | ||
integration.js | ||
invite.js | ||
label.js | ||
member-stripe-customer.js | ||
member.js | ||
mobiledoc-revision.js | ||
permission.js | ||
post.js | ||
posts-meta.js | ||
role.js | ||
session.js | ||
settings.js | ||
stripe-customer-subscription.js | ||
tag-public.js | ||
tag.js | ||
user.js | ||
webhook.js |