Issue Feature Closed

#58151Access other properties in validator

Philipp Wrann 04/24/14, 12:05 updated 07/01/15, 10:24

Description

It would be nice if i write a validator that i could access other properties to check against.

For example a ConfirmationValidator (proeprty x has to an exact copy of property y)
or DepartureDateValidator (Date has to be +1day compared to other Date)

I know i could solve that in a specific validation in my controller, but in my special case its not possible because i create the validation dynamically (extensible requesting objects passed as array and the validationconjunction is being created in the requestcontroller by some identifier for the requesttype)
So i would have to implement some kind of hook where this solution would be much easier.

When calling a Validator simply pass the object that is beeing validated would be enough.
I could really use this feature.

What you think about it?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.