Skip to content

Commit

Permalink
Set soft limits for blog title and description (#9250)
Browse files Browse the repository at this point in the history
refs #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 authored and kirrg001 committed Nov 16, 2017
1 parent 31ee7bb commit 1bb9d4f
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 1bb9d4f

Please sign in to comment.