Skip to content

Commit

Permalink
Added doCheckAppID
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Mar 20, 2020
1 parent 9d5056f commit dfb37ac
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 dfb37ac

Please sign in to comment.