...
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, we recommend to validate them all at once and show errors for each one.
To do this, return an array containing pairs of label and error.
...
Code Block |
---|
string [] files = BA_getMultiValues(argv, "file"); for(int i = 0; i < size(files); i+=2){ number ORIGINAL_NAME = i; number NEW_PATH = i + 1; desc += "File " + files[ORIGINAL_NAME] + " was uploaded to " + files[NEW_PATH] + "\n"; } |