Skip to content

Commit

Permalink
IBX-2218: Fixed richtext validation if only one characted (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Feb 3, 2022
1 parent 191296a commit f946a73
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@
const isEmpty = !this.richtextEditor.getData().length;
const isError = isRequired && isEmpty;
const result = { isError };

if (isError) {
result.errorMessage = ibexa.errors.emptyField.replace('{fieldName}', label);
}

return result;
}
}
Expand All @@ -67,7 +69,7 @@
richtextEditor,
eventsMap: [
{
selector: SELECTOR_INPUT,
selector: '.ibexa-data-source__input.ibexa-input--textarea',
eventName: 'input',
callback: 'validateInput',
errorNodeSelectors: [SELECTOR_ERROR_NODE],
Expand Down

0 comments on commit f946a73

Please sign in to comment.