This module adds an extra tab to each field instance, allowing you to specify validation rules for your field instances.
The following validators are currently included (7.x-2.x):
- Regular expression
- Numeric values (optionally specify min and / or max value)
- length (optionally specify min and / or max length)
- number of words (optionally specify min and / or max words )
- Plain text (disallow tags)
- Must be empty (Anti-Spam: Hide with CSS)
- Words blacklist
- number of selections (optionally specify min and / or max selections )
- Match against a field
- Match against a property
- Specific value(s)
- Require at least one of several fields
- Equal values on multiple fields
- Unique values on multiple fields
- PHP Code (powerfull but dangerous)
- URL (support internal path and external url validation)
- Pattern (Regular expression lite)
- Date range2
Following validators are included in sub module field validation extras:
- EAN number
- Field collection unique
- Integer values
- IP Address
- Numeric(HTML5, with the option to specify min/max/step)
- Regular expression (Perl-Compatible)
- Required field
- Require some of several fields
- Postal code(depend on Postal Code Validation, support Address Field)
Since 7.x-2.1, we add another sub module property validation which could solve validation issues for property(non-field), such as title, Ubercat SKU, list_price.
1, first make sure that the Field validation ruleset machine name using following pattern:
"Your Entity type" + '_' + "bundle", for example:
So the Field validation ruleset machine name must be:
2, column is "value" or 'target_id' or ...
the UI will be improved in the future, use selection instead of input.
3, there are only a few validation rules:
Email,Regex,Length,Must be Empty.
we will add more in the future.
Lullabot write a doc for this module:Write complex validation rules for your fields, http://www.lullabot.com/articles/module-monday-field-validation
- This module was sponsored by Think in Drupal
The author can be contacted for paid customizations of this module as well as Drupal consulting and development.