Copied to clipboard

Flag this post as spam?

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


  • Matt Brailsford 3642 posts 19322 karma points MVP 9x c-trib
    Oct 31, 2012 @ 15:04
    Matt Brailsford
    0

    Feature Request: Pass in the current id to validators

    Hey,

    Just thought I'd let you know of a feature request I though of. I'm writing a custom validator to ensure a name is unique which checks the database to see if it is already taken, the issue is, I need to ignore the entry for the current entry as it is ok for it to have the same name, as it will just overwrite it, so it would be good if for the validators, aswell as the new value, it also gave you the id of the entry it is editing so that I could more easily exclude that item.

    I've gotten round it for the time being by getting the id from the querystring, but would be better if this was just made available.

    Cheers

    Matt

  • Sune Bøegh 64 posts 374 karma points
    Oct 31, 2012 @ 17:09
    Sune Bøegh
    0

    Hi Matt, havn't had time to go through your other feature requests yet, but exellent input, keep'em coming! :)

    Makes sense to have access to the current ID in validators, I'll put it on the todo, but getting the id from querystring is a fine workaround - the parameter name is highly unlikely to change.

    - Sune

  • Matt Brailsford 3642 posts 19322 karma points MVP 9x c-trib
    Oct 31, 2012 @ 17:12
    Matt Brailsford
    0

    Yea, it's good enough for my purposes, it just might rile the purists :)

  • Sune Bøegh 64 posts 374 karma points
    Oct 31, 2012 @ 17:21
    Sune Bøegh
    0

    Hehe, purists in the Umbraco community? No such thing :D

Please Sign in or register to post replies

Write your reply to:

Draft