Announcement

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

    12.0p: Validation question and ValidationContext.setResultingValue() improvement suggestion

    Hi Isomorphic,

    from the Validator.stopIfFalse docs I assume/know that validators defined for a field run in the order they are defined in the .ds.xml.
    If this is true, could you add this information to the docs?

    Is there also an defined / guaranteed order in which the fields are being validated?

    If so, a new overload for ValidationContext.setResultingValue() that is not
    • setResultingValue(Object value)
    • but instead
    • setResultingValue(String columnName, Object value)
    would be nice to have (related thread).

    What do you think?

    Best regards
    Blama

    #2
    Validators are executed in the order you define them, however the order in which fields are validated is not guaranteed, nor is it guaranteed that all fields are validated (as only some fields may actually have been changed). For this reason your suggestion of modifying other fields wouldn't have well-specified behavior.

    Comment


      #3
      Hi Isomorphic,

      thank you for the explanation. It makes sense to me.

      Best regards
      Blama

      Comment

      Working...
      X