Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
add validation for quote if not on quote tab (bug 1032832)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Jul 1, 2014
1 parent fc27f1d commit f45ca25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/media/js/validate_transonic.js
Expand Up @@ -31,6 +31,11 @@ define('validate_transonic',
[feed.FEEDAPP_QUOTE].indexOf(data.type) !== -1) {
errs.push(gettext('Quote text is required.'));
}
if (!validate_localized_field(data.pullquote_text) &&
[feed.FEEDAPP_QUOTE].indexOf(data.type) === -1 &&
data.pullquote_rating || data.pullquote_attribution) {
errs.push(gettext('Quote text is required if quote rating or quote attribution is set.'));
}
return errs;
};

Expand Down

0 comments on commit f45ca25

Please sign in to comment.