We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 408eded commit 5f5632fCopy full SHA for 5f5632f
client/app/controllers/comments_controller.js
@@ -22,8 +22,10 @@ export default class extends Controller {
22
errorList.innerHTML = '';
23
if (!inputAuthor.value) {
24
errors.push('Author');
25
- }
26
- if (!inputText.value) {
+ } else if (!inputText.value) {
+ errors.push('Text');
27
+ } else {
28
+ errors.push('Author');
29
errors.push('Text');
30
}
31
errors.forEach((error) => {
0 commit comments