Announcement Announcement Module
Collapse
No announcement yet.
Serverside validation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Serverside validation

    I have created a User domain with not null fields.

    If i remove following javascript validation on submit.
    Code:
    <script type="text/javascript">Spring.addDecoration(new Spring.ValidateAllDecoration({elementId:'proceed', event:'onclick'}));</script>
    server side validation for notNull attribute doesn't work. On save user is created without validation errors.

  • #2
    Don't know why @NotNull doesn't work (maybe a converter sets it to empty?), but you also can try "@Size(min=1)".

    Comment


    • #3
      @NotEmpty and @Size(min=1) both are server side validation they don't work on client side only @NotNull works on client side.

      I think this is a defect in roo, @NotNull should work on server side with proper validation error as [fieldName] is required.

      Comment


      • #4
        This seems like we need to take a closer look. Can you open a Jira issue with the relevant Roo script or application?

        Cheers,
        Stefan

        Comment


        • #5
          I have opened an issue on jira

          http://jira.springframework.org/browse/ROO-800

          Comment

          Working...
          X