[ROO-2473] Fields marked with --sizeMin don't always have "required" in prompt Created: 26/May/11  Updated: 05/Jul/11  Resolved: 29/May/11

Status: Resolved
Project: Spring Roo
Component/s: WEB MVC
Affects Version/s: 1.1.4.RELEASE
Fix Version/s: 1.1.5.RELEASE

Type: Bug Priority: Trivial
Reporter: Andrew Swan Assignee: Stefan Schmidt
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


To replicate:

  1. Run clinic.roo
  2. Go to the "Create new Owner" page
  3. Click into the "Email" field; note that the prompt says "Enter Email"
  4. Submit the form; the email field displays the error "size must be between 6 and 30"

If the form won't submit without an email addresses entered, then the prompt for that field should say "Enter Email (required)".

The workaround is to add a JPA @NotNull annotation to the relevant entity field; the MVC addon will then update the relevant JSPX files by adding required="true" to that field. However @NotNull is a persistence-related annotation, not a validation/UI annotation. The presence of the JSR-303 @SizeMin annotation should be enough for the MVC addon to mark the field as required.

Comment by Stefan Schmidt [ 29/May/11 ]

Fixed with commit a5d5341af47ba61c7ac57e997027251a26779b3e. Jspx elements will now contain the required flag when a minimum is set (no need for @NotNull).

Generated at Mon Aug 03 12:40:06 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.