Skip to content

Commit

Permalink
Merge pull request #287 from jglick/appID
Browse files Browse the repository at this point in the history
Added doCheckAppID
  • Loading branch information
bitwiseman committed Mar 24, 2020
2 parents 75d5dc6 + dfb37ac commit 33d67ae
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ public ListBoxModel doFillApiUriItems() {
return getPossibleApiUriItems();
}

public FormValidation doCheckAppID(@QueryParameter String appID) {
if (!appID.isEmpty()) {
try {
Integer.parseInt(appID);
} catch (NumberFormatException x) {
return FormValidation.warning("An app ID is likely to be a number, distinct from the app name");
}
}
return FormValidation.ok();
}

@POST
@SuppressWarnings("unused") // stapler
@Restricted(NoExternalUse.class) // stapler
Expand Down

0 comments on commit 33d67ae

Please sign in to comment.