-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validating complex attribute as a whole #261
Comments
I like the idea, this will allow to validate also properties in the middle of the obj path |
Great idea! If no one else wants to, I wouldn't mind writing a pull request and tests for this feature. |
@platinumazure please, do it. |
I suggest to merge #260 first to avoid conflicts |
This was referenced Jan 25, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lets say the model has attribute which value is complex object such as:
Currently, due to flattening, this attribute can only be validated using validation keys
complex.one
andcomplex.two
, but not on a whole objectcomplex
. What I would really like to do is to specify custom validator oncomplex
, for example like this:To make it work I minorly modified flatten function to include the key of complex object in addition to other flattened nested keys.
My modified flatten function is:
What do you think, perhaps it could be included into the upstream?
The text was updated successfully, but these errors were encountered: