//Border to add red asterisk on error, FormComponentFeedbackIndicator could be used for something more.
//TODO: MZA: Take a look at FormComponentFeedbackBorder markup (its wicket:body) as a hint for required label
//TODO: MZA: How to change a background color of an input with validation error?
loginForm.add(new FormComponentFeedbackBorder("border").add(
(usernameField = new RequiredTextField<String>("username", Model.of("")))));
usernameField.add(new PlaceholderBehavior(getString("label.username")));
usernameField.add(new RequiredBehavior());
loginForm.add(passwordField = new PasswordTextField("password", Model.of("")));
passwordField.add(new PlaceholderBehavior(getString("label.password")));
passwordField.add(new RequiredBehavior());
}