How do I define my own feedback messages in Wicket? For example: if I give an incorrect username, I want to get an error message like \"The user name in incorrect, try to login
@user1090145: I've used overloaded Component's error() method in Validator's class:
private void error(IValidatable validatable, String errorKey) {
ValidationError error = new ValidationError();
error.addMessageKey(errorKey);
validatable.error(error);
}
and invoked it in validate() by
error(validatable, "your-form.field.text-id");
Properties your-form.field.text-id must be defined in YourPage.properties
Sources: Create custom validator in Wicket and Form validation messages