Hello Zbynek,

In our project we are customizing validation messages as follows:

Markup:
<label wicket:for="wicketid"><wicket:message key="label_key" /></label>
<input type="text" wicket:id="wicketid" />

Java:
add(new
RequiredTextField<String>("wicketid").setLabel(Model.of(getString("label_key"))));

This way lots of built-in validation messages will be "auto-customized"

not sure if it will work for you


On Mon, 28 Jan 2019 at 16:44, Zbynek Vavros <[email protected]> wrote:

> So I am using localized version of validation message for required fields
>
> Required=My custom message for field '${label}'
>
> but the resulting message contains field ID as parameters and result is
> i.e.
>
> "My custom message for field 'password'"
>
> since the whole page is not in English I would like to have the parameter
> localized as well.
> Some of the users do not speak English and they would not understand what
> "password" is.
>
> I see in code of org.apache.wicket.markup.html.form.FormComponent
> that the component's getId() is used as parameter. Any way to customize
> this?
>
> I can surely use validation message for this specific field with key i.e.
> "password.Required"
> but I would like to be more generic.
>
> Thanks,
> Zbynek
>


-- 
WBR
Maxim aka solomax

Reply via email to