Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

Field validation

This module provides a collection of configurable validation rules for your field instances. 3.0.x version allow you add Drupal'core constraint to field by UI. It support 40+ symfony constraints.

Callback Constraint

Callback Constraint allow you set a callback and write logic code in the callback

Conditional validation

Conditional validation is an available option to select after you choose a validator. As the name implies, if it is selected (and

Contributed modules

The field validation module provides a framework for field validation, which means other modules can provide their own custom validators for

Custom PHP function

NB! The Custom PHP function validator (in Field validation 7.x-1.x) has been replaced by the PHP code validator in version 7.x-2.x.

Date range validator

This is the Document for date range rule.

Field validation

Field validation adds an extra tab to each field instance, allowing you to specify validation rules for your field instances.

How to write a validator for field validation 7.x-2.x

In field validation 7.x-2.x, validator is a plugin of Ctools, it is very easy to write your own validator, here is an example :

Make node title unique in Drupal 7 (code snippet)

If you want make a field unique, you could both use this module or Unique field.

Match another field(or entity property)

This is a powerful validator that could be used on many case. it support multiple arguments for "another field":

PHP code validator

In Field validation 7.x-2.x, a PHP code validator is included. It is superpowerful, but also very dangerous.

Replicate the validation functionality of the VIN Field for CCK module

The VIN Field for CCK module ( https://drupal.org/project/vinfield ) has not been updated in a long while, & has never been ported to Drupal

Symfony Expression Constraint

it allow you write some twig-like expression .

Unique

Unique validator make sure the values of one field is unique.it support 3 options:

Update from 8.x-1.x to 3.0.0

update path from 8.x-1.x to 3.0.0

Update from field validaton 1.x to 2.x

Validating multiple fields of the same entity

There are three types of validations:

Validating properties

In addition to Fields, it is possible to validate entity properties (user name, node title, term tid ...) using the Property Validation

Guide maintainers

g089h515r806's picture