Skip to content
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

Add ability to use parent of the attribute in 'by' validator #16

Merged
merged 1 commit into from
Feb 18, 2016

Conversation

ashneyderman
Copy link
Contributor

As mentioned in issue #15 cross-field dependent validation is not possible in vex due to the fact that validators are not provided with the field-surrounding context. This PR does the following;

  • it declares an extra validate/3 function on Vex.Validator.Behaviour
  • changes Vex.Validator to implement the new function in all existing
    validators that do not take advantage of the new context (backwards compatibility)
  • modify Vex.Validators.By to take advantage of the new optional context param

benwilson512 added a commit that referenced this pull request Feb 18, 2016
Add ability to use parent of the attribute in 'by' validator
@benwilson512 benwilson512 merged commit c1d29f0 into CargoSense:master Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants