newProjectForm.reject("name", "project.name.duplicate");
}
ValidationError error = newProjectForm.error("name");
if (error != null) {
if (PatternValidator.message.equals(error.message())) {
newProjectForm.errors().remove("name");
newProjectForm.reject("name", "project.name.alert");
} else if (RestrictedValidator.message.equals(error.message())) {
newProjectForm.errors().remove("name");
newProjectForm.reject("name", "project.name.reserved.alert");