...
Generic errors show up in the upper part of the screen, as demonstrated below.
To do this, all you have to do is return the error message. Like this:
Code Block |
---|
string fruit = getElement(argv, 1); if( isNull(fruit) ){ return "What? You don't like fruits?"; } |
Field Validation Errors
If you have multiple input fields on the screen, it would be nice to validate them all at once and show errors for each one.
...
To do this, you will have to return an array containing pairs of label and error.
...