background preloader

Field Validation

Facebook Twitter

Testeur d'expressions régulières. Field Validation. Field Validation is a new arrival to the Drupal module directory: its 1st release was just a week ago, and it's designed for Drupal 7's new Field API. What does it do? Field Validation allows you to add simple validation rules to custom Drupal fields, using a simple UI. The module was inspired by Webform Validation, which adds similar validation to WebForm components. Right now, only basic regular expression validation rules are supported support but the module provides hooks for implementing other validation rules.

One common application is enforcing a certain format for information entered into a text field. First, create a textfield field called id_number and edit the field. Next, fill out the settings form for the field. Save the form, and add a new piece of content for the node type you added the field to. Finally, try it with a valid id. Drupal Field Validation using Regular Expressions.