Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom Allen 50 posts 71 karma points
    Oct 07, 2011 @ 12:12
    Tom Allen
    1

    Adding a new node and validating one field by comparing to another

    Trying to achieve the following:

    I have an Event doctype, with a Start Date and an End Date. If an End Date is chosen, I want to validate it by comparison with the Start Date, checking that an earlier date has not been chosen.

    I can only find regex validation options when setting up the Document Type, however.

    How would I go about doing this?

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Oct 07, 2011 @ 12:48
    Dirk De Grave
    1

    you can only validate a single property and not another property's value, you could however:

    • -build your own datatype to include both start/end date on same property, or
    • -cancel out the save if start/end date values are not set correctly based on your specs.

    Both solutions would require some custom code, but it's quite straightforward to implement these.

    Cheers,

    /Dirk

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies