Skip to content

Commit

Permalink
Merge pull request busyorg#2212 from economicstudio/2211-increase-max…
Browse files Browse the repository at this point in the history
…-tag-for-scot

increase tag limit to 12
  • Loading branch information
economicstudio committed Jul 19, 2019
2 parents eda94cc + 6a7e74d commit 233d585
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/client/components/Editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import withEditor from './withEditor';
import EditorInput from './EditorInput';
import { remarkable } from '../Story/Body';
import BodyContainer from '../../containers/Story/BodyContainer';
import { BENEFICIARY_PERCENT } from '../../helpers/constants';
import { BENEFICIARY_PERCENT, MAX_TAG } from '../../helpers/constants';
import './Editor.less';

@injectIntl
Expand Down Expand Up @@ -141,12 +141,17 @@ class Editor extends React.Component {
}

checkTopics = intl => (rule, value, callback) => {
if (!value || value.length < 1 || value.length > 5) {
if (!value || value.length < 1 || value.length > MAX_TAG) {
callback(
intl.formatMessage({
id: 'topics_error_count',
defaultMessage: 'You have to add 1 to 5 topics.',
}),
intl.formatMessage(
{
id: 'topics_error_max_tag',
defaultMessage: 'You have to add 1 to {max_tag} topics.',
},
{
max_tag: MAX_TAG,
},
),
);
}

Expand Down
1 change: 1 addition & 0 deletions src/client/helpers/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const BENEFICIARY_ACCOUNT = 'busy.org';
export const BENEFICIARY_PERCENT = 1000;
export const REFERRAL_PERCENT = 1000;
export const MAX_TAG = 12; // to support SCOT tokens. but some Steem API may not work properly for more than 5 tags.

export const knownDomains = [
'busy.org',
Expand Down

0 comments on commit 233d585

Please sign in to comment.