Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Last active July 3, 2020 11:12
Embed
What would you like to do?
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