add(form);
// Password fields
PasswordTextField passwordInput = new PasswordTextField("newPasswordInput", this.passwordModel);
passwordInput.setLabel(new ResourceModel("register.password"));
passwordInput.add(new PasswordPatternValidator());
form.add(passwordInput);
PasswordTextField confirmPasswordInput = new PasswordTextField("confirmPasswordInput", this.confirmPasswordModel);
confirmPasswordInput.setLabel(new ResourceModel("register.confirmPassword"));
form.add(confirmPasswordInput);