Hi All,

I have the following BeanEditForm:

<t:beaneditform t:id=*"userRegistrationForm"* t:object=*"user"*
t:submitLabel="${message:registrationButton-label}"

include=
*"username,lastName,firstName,email,phone,password,confirmPassword,newsletter"*
>

</t:beaneditform>

Backed by a User class with these properties:

@NotNull

@NotBlank

@Size(min = 3, max = 30)

*private* String firstName;


 @NotNull

@NotBlank

@Size(min = 3, max = 30)

*private* String lastName;


 @NotNull

@NotBlank

@Size(min = 3, max = 20)

@Pattern(regexp = ValidationConstants.*USERNAME_REGEXP*, message =
"{com.ajanlatotkapok.user.User.username-pattern-message}")

*private* String username;


 @NotNull

@NotBlank

@Email

*private* String email;


 @Pattern(regexp = ValidationConstants.*PHONE_NUMBER_REGEXP*, message =
"{phone-regexp-message}")

@Size(min = 9, max = 20)

*private* String phone;


 @Validate("password")

@Transient

*private* String password;


 @Validate("password")

@Transient

*private* String confirmPassword;

By default the autofocus is enabled for the BeanEditForm and it seems that
only tapestry's @Validate fields are considered when determining which
field is the first required field on the form ignoring @NotNull and
@NotBlank JSR-303 annotations.

As a workaround I can annotate all required fields
with @Validate("required"), though I would prefer to stick with only
JSR-303 where I can.

Shall I raise a bug in JIRA?

Thanks and regards,
Balazs Palcso

Reply via email to