Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    server-side validation

    Hi guys,

    I have a data source for crud operations. I am overriding the DMI operation in order to use my legacy code in a migration. So, I would like to implement a server-side validation to prevent that the user try to insert a new row with a wrong combination of two fields. Then I plan before saving to verify in the database whether that combination of fields is correct. I will implement a method that shall return a boolean value. How can I implement this validation? Is there a feature of SmartGWT that should employed here, or may I do it via a simple DMI call?

    Thanks in advance.

    Vitor Eduardo

    #2
    Take a look at the QuickStart Guide, Server Framework chapter (search for "valid"). Multiple approaches are discussed.

    Comment


      #3
      Hi vitor.eduardods,

      regarding validation for two dependent fields please also see this thread, as validators only declared on field level are not executed always (e.g. when both fields are null, which could be an invalid combination in your use case).
      Therefore, the new approach presented there by Isomorphic in the last post should be the correct one.

      Best regards
      Blama

      Comment

      Working...
      X