Skip to content

Commit

Permalink
Merge 9f788df into 3c8e6a1
Browse files Browse the repository at this point in the history
  • Loading branch information
GodswillOnuoha committed Sep 27, 2018
2 parents 3c8e6a1 + 9f788df commit 9381213
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/utils/articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class articleValidation {
data.title = data.title ? data.title : '';
data.description = data.description ? data.description : '';
data.body = data.body ? data.body : '';
if (!(data.title)) {
if (!(data.title.trim())) {
error.title = 'Please provide article title';
}
if (!(data.description)) {
error.description = 'Please article description';
if (!(data.description.trim())) {
error.description = 'Please provide article description';
}
if (!(data.body)) {
error.body = 'Please supply article body';
if (!(data.body.trim())) {
error.body = 'Please provide article body';
}
return {
error,
Expand Down

0 comments on commit 9381213

Please sign in to comment.