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.
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.
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
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
Yea, it's good enough for my purposes, it just might rile the purists :)
Hehe, purists in the Umbraco community? No such thing :D
is working on a reply...