Skip to content

Commit

Permalink
Add additional validation check for lists (#9243)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydhulia authored Sep 15, 2021
1 parent 69872c6 commit dc6464f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/src/components/selfservice/SelfServiceComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ class SelfServiceComponent extends Component {
const messages = [];
Object.keys(inputs).forEach((idx) => {
const input = inputs[idx];
if (!result[input.name]) {
messages.push(`No value is given for ${input.name}`);
if (!result[input.name] || result[input.name].length === 0) {
messages.push(`No value is given for ${input.text}. If you entered text for ${input.text},
don't forget to press enter to add it`);
}
});

Expand Down

0 comments on commit dc6464f

Please sign in to comment.