Raising error if no count is entered.

This commit is contained in:
David Jay
2016-12-12 19:12:53 -05:00
parent bd240923cc
commit 426e0a02bd
@@ -19,7 +19,7 @@ const updateCharCountEnable = (updateSettings, charCountChecked) => () => {
const updateCharCount = (updateSettings, settingsError) => (event) => {
const charCount = event.target.value;
if (charCount.match(/[^0-9]/)) {
if (charCount.match(/[^0-9]/) || charCount.length === 0) {
settingsError('charCount', true);
} else {
settingsError('charCount', false);