Skip to content

Commit

Permalink
Update message trimmed validation to allow empty message
Browse files Browse the repository at this point in the history
  • Loading branch information
quyettvq authored Nov 25, 2020
1 parent c0a6989 commit 9af1295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/modules/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function validate_idShouldBeTrimmed(errors, id) {
}

function validate_messageShouldBeTrimmed(errors, msg) {
if (msg.trim() !== msg) {
if (msg.trim() !== msg && msg.trim() !== '') {
errors.push(`Messages should not start or end with whitespaces`);
}
}
Expand Down

0 comments on commit 9af1295

Please # to comment.