Skip to content

Commit

Permalink
mid-8886 removed duplicated error message while form validation
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Sep 11, 2023
1 parent cc7f387 commit 55cd7cf
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import org.apache.wicket.markup.html.form.validation.IFormValidator;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LambdaModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;
import org.apache.wicket.validation.Validatable;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -111,14 +109,6 @@ protected ObjectType getObjectType() {
};

validator.validate(validatable);
if (!validatable.isValid()) {
validatable.getErrors().forEach(e ->
form.error(e.getErrorMessage((key, vars) ->
new StringResourceModel(key)
.setModel(new Model<String>())
.setDefaultValue(key)
.getString())));
}
}

protected abstract PrismObjectWrapper<O> getObjectWrapper();
Expand Down

0 comments on commit 55cd7cf

Please sign in to comment.