What is your real question ?

The error message ? The email validation mechanism ?

If you want a more precise message for the error message, put a Label on
your TextField :

Form f = new Form("form");
add(f);
TextField<String> tf = new TextField<String>("text", new Model(),
String.class);
f.add(tf);
tf.add(EmailAddressValidator.getInstance());
tf.setLabel(Model.of("Email validated TextField");


R


2011/3/15 vov [via Apache Wicket] <
ml-node+3356588-93268421-216...@n4.nabble.com>

> After submitting a form:
>
> add(new Form("form") //
>         .add(new TextField("text", new Model(), String.class) //
>             .add(EmailAddressValidator.getInstance())))
>
> with empty field the fallowing error occur:('' is not a valid email
> address.)
>
> Without setting type for TextField - all fine
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Set-FormComponent-Type-and-EmailValidator-tp3356588p3356588.html
>  To start a new topic under Users forum, email
> ml-node+1842947-98389252-216...@n4.nabble.com
> To unsubscribe from Users forum, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842947&code=cmNvcXVldWduaW90QGdtYWlsLmNvbXwxODQyOTQ3fDE1MTA1ODc1MTA=>.
>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Set-FormComponent-Type-and-EmailValidator-tp3356588p3381466.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to