Skip to content

Commit

Permalink
ContentValidator added seo fields to create rules
Browse files Browse the repository at this point in the history
  • Loading branch information
PSkierniewski committed Jul 10, 2015
1 parent 76c9a5a commit 1fe7006
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/Gzero/Api/Validator/ContentValidator.php
Expand Up @@ -39,18 +39,20 @@ class ContentValidator extends AbstractValidator {
'trashed' => ''
],
'create' => [
'type' => 'required|in:content,category',
'parentId' => 'numeric',
'isOnHome' => 'boolean',
'isCommentAllowed' => 'boolean',
'isPromoted' => 'boolean',
'isSticky' => 'boolean',
'isActive' => 'boolean',
'publishedAt' => 'date|date_format:Y-m-d H:i:s',
'translations.langCode' => 'required|in:pl,en',
'translations.title' => 'required',
'translations.teaser' => '',
'translations.body' => ''
'type' => 'required|in:content,category',
'parentId' => 'numeric',
'isOnHome' => 'boolean',
'isCommentAllowed' => 'boolean',
'isPromoted' => 'boolean',
'isSticky' => 'boolean',
'isActive' => 'boolean',
'publishedAt' => 'date|date_format:Y-m-d H:i:s',
'translations.langCode' => 'required|in:pl,en',
'translations.title' => 'required',
'translations.teaser' => '',
'translations.body' => '',
'translations.seoTitle' => '',
'translations.seoDescription' => ''
],
'update' => [
'parentId' => 'numeric',
Expand Down

0 comments on commit 1fe7006

Please sign in to comment.