Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Last active July 3, 2020 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/01b0a61fe9298770c81909f41c87cd27 to your computer and use it in GitHub Desktop.
Save velotiotech/01b0a61fe9298770c81909f41c87cd27 to your computer and use it in GitHub Desktop.
public FormValidation doCheckName(@QueryParameter String value)
throws IOException, ServletException {
if (value.length() == 0)
return FormValidation.error("Please set a name");
if (value.length() < 4)
return FormValidation.warning("Isn't the name too short?");
return FormValidation.ok();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment