This project is not covered by Drupal’s security advisory policy.
This module is a plugin for Field Validation module. The purpose of this module is to give site builders a method to set validation criteria that compare current field value to other values in one or more fields from the same form, combined, with no custom code involved. It allows simple comparisons and math operations.
How does it work:
For example:
"Net income should be same as gross income minus taxes."
Would be
field_net_income as source field, comparison set to "same as", and then we write:
field_gross_income - field_income_tax - field_some_other_tax
In the value field.
At the moment of writing this, it only works for numeric fields. It currently supports most usual logical operators: equal, not equal, greater than, greater or equal to, etc.
How operation is solved
Using a regex, all field names are found and replaced by their current values, or zero if they're blank. Then the math operation is executed and compared with base field's value.
Supporters
Project was developed for SIASAR project (Rural Water and Sanitation Information System), with the support of World Bank Group, and it's used there on a daily basis.
Attachment | Size |
---|---|
field_validation_against_math_example_8b.png | 109.15 KB |
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Content Editing Experience, Site Structure
- 3 sites report using this module
- Created by nachenko on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Initial public release
Development version: 7.x-1.x-dev updated 14 Dec 2017 at 09:33 UTC