Should @org.hibernate.validator.constraints.Email on a bean field be
validated by Tapestry or just the JSR 303? @Validate("email") works, but
@Email doesn't.

Adam

On Tue, Nov 17, 2015 at 3:30 PM, Adam X <vbgnm3c...@gmail.com> wrote:

> No I haven't. But I added it, and 303 annotations are picked up.
>
> Thank You!
>
> On Tue, Nov 17, 2015 at 3:28 PM, WILBERT Romain-ext <
> romain.wilbert-...@pole-emploi.fr> wrote:
>
>> Have you tried to add "validate=user" on your form tag ?
>>
>> -----Message d'origine-----
>> De : Adam X [mailto:vbgnm3c...@gmail.com]
>> Envoyé : mardi 17 novembre 2015 15:23
>> À : Tapestry users
>> Objet : 5.4 JSR-303 on Entities
>>
>> Seems like T 5.4-rc-1 is not validating fields entity fields annotated
>> with
>> JSR-303, but it does when field is annotated with @Validate.
>>
>> Abbreviated Example:
>>
>> @Entity
>> public class User {
>> .....
>> @NotNull
>> private String foo;
>>
>> @Validate("required")
>> private String bar;
>>
>> // getters/setters
>> }
>>
>> Page.java
>>
>> @Property
>> private User user;
>>
>> Page.tml
>>
>> <form t:type="form">
>> <input t:type="textfield" t:id="foo" t:value="user.foo"/>
>> <input t:type="textfield" t:id="bar" t:value="user.bar"/>
>> </form>
>>
>> So what happens both fields should produce error on empty input but only
>> bar does.
>>
>> Adam
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

Reply via email to