Skip to content

Commit

Permalink
πŸ—œ Set soft limits for blog title and description
Browse files Browse the repository at this point in the history
refs TryGhost#8143

Add max length validations to settings:
- `blog.title`: 150 chars
- `blog.description`: 200 chars

The `validateSettings` fn in our validations checks for existing `validations` properties in our `default-settings.json` file, similar to other tables in our `schema.js`.
  • Loading branch information
aileen committed Nov 16, 2017
1 parent 7ab7255 commit ff4a7e1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions core/server/data/schema/default-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@
},
"blog": {
"title": {
"defaultValue": "Ghost"
"defaultValue": "Ghost",
"validations": {
"isLength": {
"max": 150
}
}
},
"description": {
"defaultValue": "The professional publishing platform"
"defaultValue": "The professional publishing platform",
"validations": {
"isLength": {
"max": 200
}
}
},
"logo": {
"defaultValue": "https://casper.ghost.org/v1.0.0/images/ghost-logo.svg"
Expand Down

0 comments on commit ff4a7e1

Please sign in to comment.