mirror of
https://github.com/wassname/talk.git
synced 2026-07-30 12:40:41 +08:00
Raising error if no count is entered.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user